refactor(cli): dynamic version for nerve agent — Phase 3 of RFC #289 #297

Merged
xingyue merged 1 commits from feat/agent-inject-phase3 into main 2026-04-30 14:08:03 +00:00
Owner

What

Phase 3 of RFC #289: 打包与版本管理。

改动

  • 移除硬编码的 CLI_VERSION = "0.5.0"
  • 改为运行时从 package.json 动态读取版本,带缓存
  • Phase 2 已将 skills 加入 package.json files

验证结果

  • pnpm pack 产物包含 skills/hermes/SKILL.md
  • inject 后 .nerve-version 与 package.json version 一致
  • nerve agent status 版本匹配显示
  • 版本不匹配时显示 ⚠️ 并提示 update
  • biome check 通过
  • build 通过

Testing

所有步骤在 #296 中已验证

Ref: #289

## What Phase 3 of RFC #289: 打包与版本管理。 ### 改动 - 移除硬编码的 `CLI_VERSION = "0.5.0"` - 改为运行时从 package.json 动态读取版本,带缓存 - Phase 2 已将 `skills` 加入 package.json files ### 验证结果 - ✅ `pnpm pack` 产物包含 `skills/hermes/SKILL.md` - ✅ inject 后 `.nerve-version` 与 package.json version 一致 - ✅ `nerve agent status` 版本匹配显示 ✅ - ✅ 版本不匹配时显示 ⚠️ 并提示 update - ✅ biome check 通过 - ✅ build 通过 ## Testing 所有步骤在 #296 中已验证 ✅ Ref: #289
scottwei added 1 commit 2026-04-30 14:07:24 +00:00
Phase 3 of #289:
- Replace hardcoded CLI_VERSION constant with dynamic package.json read
- Cache version to avoid repeated fs reads
- Verified: npm pack includes skills/, version detection works correctly

Ref: #289, #296
xingyue merged commit 11cedfb5a5 into main 2026-04-30 14:08:03 +00:00
This repo is archived. You cannot comment on pull requests.
No Reviewers
No Label
1 Participants
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: uncaged/nerve#297