Repository navigation
feat: AI agent 실행시간 계산과 sync 전송 (버전 2026.10.1) - #29
Merged
Merged
Conversation
- Claude Code·Codex·opencode 로그로 날짜·도구·모델별 실행시간(ms)을 계산한다 - 턴 안의 간격만 세고 간격 하나는 5분까지, 로컬 자정에서 날짜를 나눈다 - 포크·resume 복사본은 원본 한 번만 센다 - 토큰 파서가 읽는 줄을 받아서 로그는 한 번만 읽는다
- 토큰과 함께 runtimes를 보내고 1만 개가 넘으면 나눠 보낸다 - CLI 버전이 바뀐 첫 sync는 실행시간 전체를 다시 보낸다(lastSyncVersion) - 모든 요청에 User-Agent 이름표를 붙이고 Deprecation·Sunset·410·426을 안내한다 - 결과 본문이 없는 2xx(롤백한 옛 API)는 다음 sync에 다시 보내고, 못 읽은 도구는 경고만 남긴다 - 쓰지 않던 parseAll 삭제
2 of 7 tasks
7 of 8 tasks
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.
🏷️ 작업 유형
📋 변경 사항
로그에서 AI agent 실행시간을 계산해
/api/sync의runtimes칸으로 보낸다 + 버전 2026.10.1runtimes를 보내고 1만 개가 넘으면 나눠 보냄. 실행시간이 없으면 칸을 빼서 기존과 같은 본문lastSyncVersion). 결과 본문이 없는 2xx(롤백한 옛 API)는 미완료로 보고 다음에 다시 보냄. 못 읽은 도구는 경고만 남기고 버전은 유지User-Agent: tokenphage-cli/<버전> (<os>; <arch>) node/<버전>. Deprecation·Sunset 헤더와 410·426 응답이면 업데이트 안내parseAll삭제,.gitignore에.petri/추가, 버전 2026.9.1 -> 2026.10.1커밋 4개
✅ 테스트
npm run test:coverage통과: 261/261, 커버리지 line 97.33% · branch 91.85% · function 97.62% (게이트 80%)parseAll결과와 같음~/.claude가 없으면 설정 파일을 못 만듦)은 이번 변경 전부터 있던 결함이라 따로 처리