Skip to content

fix(report): populate agent_version in report endpoint - #140

Merged
jeff-r2026 merged 1 commit into
mainfrom
fix/report-agent-version-v2
Jul 3, 2026
Merged

fix(report): populate agent_version in report endpoint#140
jeff-r2026 merged 1 commit into
mainfrom
fix/report-agent-version-v2

Conversation

@jeff-r2026

Copy link
Copy Markdown
Collaborator

Summary

  • Report API 的 agent_version 字段之前始终为空字符串,现在会正确填充实际版本号
  • 新增 src/agent-version.ts 模块,支持检测 claude / cursor / codebuddy (CLI + IDE) / workbuddy 的版本
  • CLI 工具通过 --version 命令检测,macOS Electron 应用通过 Info.plist 解析
  • 结果在进程生命周期内缓存(session 内版本不变)

检测结果示例:

claude          → 2.1.199
cursor          → 3.9.16
codebuddy       → 2.114.2
codebuddy-ide   → 4.9.15
workbuddy       → 5.2.2

Test plan

  • 新增 agent-version.test.ts 覆盖所有 agent 检测、缓存机制、未知 agent 降级
  • 已有 status-report.test.ts 全部通过(10 tests)
  • npx tsc --noEmit 类型检查通过
  • 本地实测 5 个 agent 均能正确检测到版本号

🤖 Generated with Claude Code

The report API was sending an empty string for agent_version. Add
agent-version.ts module that detects installed versions for claude,
cursor, codebuddy (CLI + IDE), and workbuddy via CLI output or macOS
plist parsing. Results are cached per session.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jeff-r2026
jeff-r2026 merged commit cad14c1 into main Jul 3, 2026
7 checks passed
@jeff-r2026
jeff-r2026 deleted the fix/report-agent-version-v2 branch July 3, 2026 06:58
@hsuchifeng hsuchifeng mentioned this pull request Jul 3, 2026
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant