fix(digest): enable usage reporting for project scope#111
Merged
Conversation
The shared usage data (~/.teamai/usage.jsonl) was only reported to the user-scope team repo during `teamai pull`. Projects with their own team repo never received stats, causing `teamai digest` to always show "No team usage data available" in project scope. Fix by: - Moving usage reporting from pullForScope() to the top-level pull(), reporting to all active scopes before truncating the shared events. - Adding skipTruncate option to reportUsageToTeam() so events survive across multiple repo targets. - Fixing `teamai stats` to resolve project-scope config when loading reported stats. - Enabling skill recommendations for project scope. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
teamai digest始终显示 "No team usage data available",因为 usage 数据只上报到 user scope 的 team repopullForScope()提升到pull()主函数,统一向所有 active scope 的 repo 上报skipTruncate选项避免共享的 usage.jsonl 被提前截断teamai stats在 project scope 下无法读取已上报数据Test plan
npx tsc --noEmit通过npx vitest run通过(2 个预先存在的 import-repo 失败无关)teamai pull,确认 stats 上报到 project team repoteamai digest,确认不再显示 "No team usage data available"teamai stats,确认能读取 project repo 的已上报统计🤖 Generated with Claude Code