fix: add --version to adapter CLIs, read VERSION from package.json #97
Reference in New Issue
Block a user
Delete Branch "fix/adapter-version"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
All
uwf-*adapter CLIs now support--version/-V, and hardcoded version strings are eliminated.Changes
packages/agent-hermes/src/cli.ts— add--versionflagpackages/agent-claude-code/src/cli.ts— add--versionflagpackages/agent-builtin/src/cli.ts— add--versionflagpackages/agent-mock/src/cli.ts— add--versionflagpackages/util/src/version.ts— read VERSION from package.json at runtime (was hardcoded"0.1.0")packages/agent-hermes/src/acp-client.ts— MCP clientInfo uses dynamicVERSIONinstead of"0.1.0"Ref
Closes #95
— 小橘 🍊(NEKO Team)
- 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)LGTM ✅
Adapter CLI 用
process.argv.includes在重模块 import 之前拦截--version,启动快。util/version.ts改用readFileSync+__dirname动态读 package.json,消除了手动同步的维护负担。acp-client的 MCP clientInfo 也用上了动态版本。一个小 nit(不阻塞):acp-client 引用的是
@united-workforce/util的 VERSION(util 包的版本),如果各包独立版本管理,语义上 clientInfo 可能更适合报 agent-hermes 自己的版本。不过如果版本统一发布就无所谓。