fix: add --version to adapter CLIs, read VERSION from package.json
CI / check (pull_request) Successful in 3m29s

- All uwf-* adapter CLIs now support --version / -V
- util VERSION constant reads from package.json at runtime
- agent-hermes ACP clientInfo uses dynamic VERSION

小橘 🍊(NEKO Team)
This commit is contained in:
2026-06-05 07:29:54 +00:00
parent cd585a26f1
commit 794f9db568
6 changed files with 39 additions and 3 deletions
+9 -2
View File
@@ -1,2 +1,9 @@
// This version is kept in sync with package.json during releases.
export const VERSION = "0.1.0";
import { readFileSync } from "node:fs";
import { dirname, join } from "node:path";
import { fileURLToPath } from "node:url";
const __dirname = dirname(fileURLToPath(import.meta.url));
const pkg = JSON.parse(readFileSync(join(__dirname, "..", "package.json"), "utf-8")) as {
version: string;
};
export const VERSION = pkg.version;