fix: acp-client reports own package version, not util VERSION
CI / check (pull_request) Successful in 2m36s

Address review nit from PR #97: clientInfo.version should be
agent-hermes's own version for correct identification under
independent versioning.

小橘 🍊(NEKO Team)
This commit is contained in:
2026-06-05 07:50:03 +00:00
parent 28427a973f
commit abeb465f46
+11 -2
View File
@@ -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<void> {
const initResponse = await this.sendRequest("initialize", {
protocolVersion: PROTOCOL_VERSION,
clientInfo: { name: "uwf", version: VERSION },
clientInfo: { name: "uwf-hermes", version: OWN_VERSION },
capabilities: {},
});