codex-usage-tracking 0.8.1__tar.gz → 0.10.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (203) hide show
  1. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/.codex-plugin/plugin.json +1 -1
  2. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/CHANGELOG.md +18 -0
  3. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/PKG-INFO +6 -2
  4. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/README.md +5 -1
  5. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/docs/architecture.md +4 -2
  6. codex_usage_tracking-0.10.0/docs/assets/dashboard-call-investigator-evidence.png +0 -0
  7. codex_usage_tracking-0.10.0/docs/assets/dashboard-call-investigator-preview.png +0 -0
  8. codex_usage_tracking-0.10.0/docs/assets/dashboard-call-investigator.png +0 -0
  9. codex_usage_tracking-0.10.0/docs/assets/dashboard-calls-preview.png +0 -0
  10. codex_usage_tracking-0.10.0/docs/assets/dashboard-calls.png +0 -0
  11. codex_usage_tracking-0.10.0/docs/assets/dashboard-details.png +0 -0
  12. codex_usage_tracking-0.10.0/docs/assets/dashboard-diagnostics.png +0 -0
  13. codex_usage_tracking-0.10.0/docs/assets/dashboard-insights.png +0 -0
  14. codex_usage_tracking-0.10.0/docs/assets/dashboard-threads.png +0 -0
  15. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/docs/cli-json-schemas.md +356 -0
  16. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/docs/cli-reference.md +14 -2
  17. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/docs/dashboard-guide.md +13 -1
  18. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/docs/development.md +15 -7
  19. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/docs/one-dot-oh-readiness.md +8 -8
  20. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/docs/privacy.md +4 -0
  21. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/pyproject.toml +1 -1
  22. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/scripts/check_release.py +3 -0
  23. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/scripts/smoke_installed_package.py +1 -0
  24. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/skills/codex-usage-tracker/scripts/run_mcp.py +2 -2
  25. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/__init__.py +1 -1
  26. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/cli.py +59 -0
  27. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/cli_parser.py +96 -0
  28. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/dashboard.py +14 -0
  29. codex_usage_tracking-0.10.0/src/codex_usage_tracker/diagnostic_snapshot_analysis.py +575 -0
  30. codex_usage_tracking-0.10.0/src/codex_usage_tracker/diagnostic_snapshot_concentration.py +338 -0
  31. codex_usage_tracking-0.10.0/src/codex_usage_tracker/diagnostic_snapshot_constants.py +25 -0
  32. codex_usage_tracking-0.10.0/src/codex_usage_tracker/diagnostic_snapshot_events.py +496 -0
  33. codex_usage_tracking-0.10.0/src/codex_usage_tracker/diagnostic_snapshot_report.py +177 -0
  34. codex_usage_tracking-0.10.0/src/codex_usage_tracker/diagnostic_snapshot_rows.py +255 -0
  35. codex_usage_tracking-0.10.0/src/codex_usage_tracker/diagnostic_snapshots.py +711 -0
  36. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/json_contracts.py +110 -0
  37. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/plugin_data/dashboard/dashboard.css +1 -1
  38. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/plugin_data/dashboard/dashboard.js +6 -0
  39. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/plugin_data/dashboard/dashboard_actions.js +4 -0
  40. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/plugin_data/dashboard/dashboard_analysis.js +18 -0
  41. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/plugin_data/dashboard/dashboard_call_investigator.js +4 -4
  42. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/plugin_data/dashboard/dashboard_details.js +3 -0
  43. codex_usage_tracking-0.10.0/src/codex_usage_tracker/plugin_data/dashboard/dashboard_diagnostics.js +522 -0
  44. codex_usage_tracking-0.10.0/src/codex_usage_tracker/plugin_data/dashboard/dashboard_diagnostics_facts.js +283 -0
  45. codex_usage_tracking-0.10.0/src/codex_usage_tracker/plugin_data/dashboard/dashboard_diagnostics_snapshots.js +403 -0
  46. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/plugin_data/dashboard/dashboard_format.js +21 -0
  47. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/plugin_data/dashboard/dashboard_i18n.js +4 -0
  48. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/plugin_data/dashboard/dashboard_live.js +15 -10
  49. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/plugin_data/dashboard/dashboard_responsive.css +3 -0
  50. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/plugin_data/dashboard/dashboard_tables.css +127 -0
  51. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/plugin_data/dashboard/dashboard_tables.js +18 -3
  52. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/plugin_data/dashboard/dashboard_template.html +5 -1
  53. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/plugin_data/dashboard/locales/ar.json +4 -0
  54. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/plugin_data/dashboard/locales/de.json +4 -0
  55. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/plugin_data/dashboard/locales/en.json +4 -0
  56. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/plugin_data/dashboard/locales/es.json +4 -0
  57. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/plugin_data/dashboard/locales/fr.json +4 -0
  58. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/plugin_data/dashboard/locales/it.json +4 -0
  59. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/plugin_data/dashboard/locales/ja.json +4 -0
  60. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/plugin_data/dashboard/locales/ko.json +4 -0
  61. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/plugin_data/dashboard/locales/pt.json +4 -0
  62. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/plugin_data/dashboard/locales/ru.json +4 -0
  63. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/plugin_data/dashboard/locales/vi.json +4 -0
  64. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/plugin_data/dashboard/locales/zh-Hans.json +4 -0
  65. codex_usage_tracking-0.10.0/src/codex_usage_tracker/plugin_data/docs/assets/dashboard-call-investigator-evidence.png +0 -0
  66. codex_usage_tracking-0.10.0/src/codex_usage_tracker/plugin_data/docs/assets/dashboard-call-investigator-preview.png +0 -0
  67. codex_usage_tracking-0.10.0/src/codex_usage_tracker/plugin_data/docs/assets/dashboard-call-investigator.png +0 -0
  68. codex_usage_tracking-0.10.0/src/codex_usage_tracker/plugin_data/docs/assets/dashboard-calls-preview.png +0 -0
  69. codex_usage_tracking-0.10.0/src/codex_usage_tracker/plugin_data/docs/assets/dashboard-calls.png +0 -0
  70. codex_usage_tracking-0.10.0/src/codex_usage_tracker/plugin_data/docs/assets/dashboard-details.png +0 -0
  71. codex_usage_tracking-0.10.0/src/codex_usage_tracker/plugin_data/docs/assets/dashboard-diagnostics.png +0 -0
  72. codex_usage_tracking-0.10.0/src/codex_usage_tracker/plugin_data/docs/assets/dashboard-insights.png +0 -0
  73. codex_usage_tracking-0.10.0/src/codex_usage_tracker/plugin_data/docs/assets/dashboard-threads.png +0 -0
  74. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/plugin_data/docs/dashboard-guide.html +2 -1
  75. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/server.py +264 -0
  76. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/store.py +191 -14
  77. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/store_query_sql.py +25 -0
  78. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/store_schema.py +28 -1
  79. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracking.egg-info/PKG-INFO +6 -2
  80. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracking.egg-info/SOURCES.txt +13 -0
  81. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/tests/store_dashboard_helpers.py +14 -4
  82. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/tests/test_cli_lifecycle.py +180 -4
  83. codex_usage_tracking-0.10.0/tests/test_dashboard_diagnostics_snapshots.py +294 -0
  84. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/tests/test_dashboard_live.py +89 -0
  85. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/tests/test_dashboard_payload.py +63 -11
  86. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/tests/test_dashboard_server.py +142 -0
  87. codex_usage_tracking-0.10.0/tests/test_diagnostic_snapshots.py +694 -0
  88. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/tests/test_store_dashboard_mcp.py +98 -6
  89. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/tests/test_store_migrations.py +6 -3
  90. codex_usage_tracking-0.8.1/docs/assets/dashboard-call-investigator-evidence.png +0 -0
  91. codex_usage_tracking-0.8.1/docs/assets/dashboard-call-investigator-preview.png +0 -0
  92. codex_usage_tracking-0.8.1/docs/assets/dashboard-call-investigator.png +0 -0
  93. codex_usage_tracking-0.8.1/docs/assets/dashboard-calls-preview.png +0 -0
  94. codex_usage_tracking-0.8.1/docs/assets/dashboard-calls.png +0 -0
  95. codex_usage_tracking-0.8.1/docs/assets/dashboard-details.png +0 -0
  96. codex_usage_tracking-0.8.1/docs/assets/dashboard-insights.png +0 -0
  97. codex_usage_tracking-0.8.1/docs/assets/dashboard-threads.png +0 -0
  98. codex_usage_tracking-0.8.1/src/codex_usage_tracker/plugin_data/dashboard/dashboard_diagnostics.js +0 -672
  99. codex_usage_tracking-0.8.1/src/codex_usage_tracker/plugin_data/docs/assets/dashboard-call-investigator-evidence.png +0 -0
  100. codex_usage_tracking-0.8.1/src/codex_usage_tracker/plugin_data/docs/assets/dashboard-call-investigator-preview.png +0 -0
  101. codex_usage_tracking-0.8.1/src/codex_usage_tracker/plugin_data/docs/assets/dashboard-call-investigator.png +0 -0
  102. codex_usage_tracking-0.8.1/src/codex_usage_tracker/plugin_data/docs/assets/dashboard-calls-preview.png +0 -0
  103. codex_usage_tracking-0.8.1/src/codex_usage_tracker/plugin_data/docs/assets/dashboard-calls.png +0 -0
  104. codex_usage_tracking-0.8.1/src/codex_usage_tracker/plugin_data/docs/assets/dashboard-details.png +0 -0
  105. codex_usage_tracking-0.8.1/src/codex_usage_tracker/plugin_data/docs/assets/dashboard-insights.png +0 -0
  106. codex_usage_tracking-0.8.1/src/codex_usage_tracker/plugin_data/docs/assets/dashboard-threads.png +0 -0
  107. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/.mcp.json +0 -0
  108. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/AGENTS.md +0 -0
  109. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/CONTRIBUTING.md +0 -0
  110. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/LICENSE +0 -0
  111. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/MANIFEST.in +0 -0
  112. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/SECURITY.md +0 -0
  113. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/assets/icon.svg +0 -0
  114. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/docs/assets/plugin-prompts.png +0 -0
  115. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/docs/assets/plugin-thread-leaderboard.png +0 -0
  116. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/docs/assets/ux/call-detail-panel.png +0 -0
  117. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/docs/assets/ux/insight-overview.png +0 -0
  118. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/docs/assets/ux/thread-investigation.png +0 -0
  119. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/docs/call-drilldown-performance-checklist.md +0 -0
  120. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/docs/install.md +0 -0
  121. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/docs/mcp.md +0 -0
  122. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/docs/pricing-and-credits.md +0 -0
  123. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/docs/ui-ux-improvement-plan.md +0 -0
  124. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/scripts/benchmark_synthetic_history.py +0 -0
  125. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/scripts/install_local_plugin.py +0 -0
  126. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/setup.cfg +0 -0
  127. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/skills/codex-usage-api/SKILL.md +0 -0
  128. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/skills/codex-usage-tracker/SKILL.md +0 -0
  129. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/__main__.py +0 -0
  130. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/allowance.py +0 -0
  131. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/api_payloads.py +0 -0
  132. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/call_origin.py +0 -0
  133. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/context.py +0 -0
  134. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/costing.py +0 -0
  135. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/diagnostic_facts.py +0 -0
  136. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/diagnostic_reports.py +0 -0
  137. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/diagnostics.py +0 -0
  138. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/formatting.py +0 -0
  139. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/i18n.py +0 -0
  140. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/mcp_server.py +0 -0
  141. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/models.py +0 -0
  142. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/parser.py +0 -0
  143. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/paths.py +0 -0
  144. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/plugin_data/__init__.py +0 -0
  145. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/plugin_data/assets/icon.svg +0 -0
  146. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/plugin_data/dashboard/dashboard_call.css +0 -0
  147. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/plugin_data/dashboard/dashboard_call_diagnostics.js +0 -0
  148. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/plugin_data/dashboard/dashboard_cells.js +0 -0
  149. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/plugin_data/dashboard/dashboard_data.js +0 -0
  150. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/plugin_data/dashboard/dashboard_detail.css +0 -0
  151. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/plugin_data/dashboard/dashboard_events.js +0 -0
  152. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/plugin_data/dashboard/dashboard_filters.js +0 -0
  153. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/plugin_data/dashboard/dashboard_insights.css +0 -0
  154. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/plugin_data/dashboard/dashboard_insights.js +0 -0
  155. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/plugin_data/dashboard/dashboard_layout.css +0 -0
  156. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/plugin_data/dashboard/dashboard_payload_cache.js +0 -0
  157. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/plugin_data/dashboard/dashboard_state.js +0 -0
  158. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/plugin_data/dashboard/dashboard_status.js +0 -0
  159. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/plugin_data/dashboard/dashboard_tooltips.js +0 -0
  160. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/plugin_data/docs/assets/plugin-prompts.png +0 -0
  161. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/plugin_data/docs/assets/plugin-thread-leaderboard.png +0 -0
  162. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/plugin_data/rate_cards/codex-credit-rates.json +0 -0
  163. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/plugin_data/skills/codex-usage-api/SKILL.md +0 -0
  164. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/plugin_data/skills/codex-usage-tracker/SKILL.md +0 -0
  165. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/plugin_installer.py +0 -0
  166. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/pricing.py +0 -0
  167. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/pricing_config.py +0 -0
  168. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/pricing_estimates.py +0 -0
  169. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/pricing_openai.py +0 -0
  170. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/projects.py +0 -0
  171. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/recommendations.py +0 -0
  172. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/redaction.py +0 -0
  173. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/reports.py +0 -0
  174. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/schema.py +0 -0
  175. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/server_utils.py +0 -0
  176. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/store_sources.py +0 -0
  177. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/store_thread_summaries.py +0 -0
  178. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/support.py +0 -0
  179. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracker/threads.py +0 -0
  180. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracking.egg-info/dependency_links.txt +0 -0
  181. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracking.egg-info/entry_points.txt +0 -0
  182. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracking.egg-info/requires.txt +0 -0
  183. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/src/codex_usage_tracking.egg-info/top_level.txt +0 -0
  184. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/tests/test_allowance.py +0 -0
  185. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/tests/test_call_origin.py +0 -0
  186. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/tests/test_cli_release.py +0 -0
  187. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/tests/test_context_evidence.py +0 -0
  188. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/tests/test_dashboard_data.py +0 -0
  189. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/tests/test_dashboard_state.py +0 -0
  190. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/tests/test_i18n.py +0 -0
  191. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/tests/test_json_contracts.py +0 -0
  192. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/tests/test_mcp_integration.py +0 -0
  193. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/tests/test_mcp_launcher.py +0 -0
  194. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/tests/test_parser.py +0 -0
  195. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/tests/test_plugin_installer.py +0 -0
  196. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/tests/test_pricing.py +0 -0
  197. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/tests/test_privacy.py +0 -0
  198. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/tests/test_projects.py +0 -0
  199. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/tests/test_recommendations.py +0 -0
  200. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/tests/test_redaction.py +0 -0
  201. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/tests/test_schema.py +0 -0
  202. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/tests/test_support.py +0 -0
  203. {codex_usage_tracking-0.8.1 → codex_usage_tracking-0.10.0}/tests/test_threads.py +0 -0
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codex-usage-tracker",
3
- "version": "0.8.1",
3
+ "version": "0.10.0",
4
4
  "description": "Unofficial local tracker for aggregate Codex token usage from local session logs.",
5
5
  "author": {
6
6
  "name": "Douglas Monsky"
@@ -2,6 +2,24 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.10.0 - 2026-06-21
6
+
7
+ - Add Git/GitHub CLI diagnostic snapshots with safe operation labels, coarse categories, mutability buckets, and terminal token-count coverage.
8
+ - Add file-modification diagnostic snapshots for structured patch events, modified-path aggregates, extension counts, and largest modification events without storing patch text or raw paths.
9
+ - Add derived call timing fields for call start, duration, previous-call timestamp, and previous-call gap across dashboard rows, details, CSV/export actions, live API sorting, and thread aggregates.
10
+ - Surface `Duration`, `Prev gap`, `Longest duration`, and `Longest gap` in the dashboard with localized labels and focused regression coverage.
11
+ - Reconcile all diagnostics panels into one release so `overview`, `tool-output`, `commands`, `git-interactions`, `file-reads`, `file-modifications`, `read-productivity`, and `concentration` can refresh together from the live dashboard.
12
+
13
+ ## 0.9.0 - 2026-06-21
14
+
15
+ - Add persisted aggregate diagnostic snapshots with explicit on-demand refresh metadata and schema-versioned CLI/API contracts.
16
+ - Add dashboard Diagnostics panels for overview, tool output, commands, file reads, read productivity, and concentration.
17
+ - Add tool-output and command reports with terminal token-count buckets, missing-count coverage, command roots, and expandable command children.
18
+ - Add file-read and read-productivity reports with token allocation, largest read commands, read-to-modify correlation, and privacy-safe path labels.
19
+ - Add concentration reports for top source/session, project/cwd, and day shares without leaking raw source-log paths.
20
+ - Keep Diagnostics refresh isolated from normal live dashboard refresh so regular usage updates do not recompute or blink diagnostic panels.
21
+ - Add Playwright diagnostics smoke coverage and release documentation for the snapshot pipeline, privacy boundary, and on-demand refresh behavior.
22
+
5
23
  ## 0.8.1 - 2026-06-20
6
24
 
7
25
  - Make Diagnostics fact tables easier to scan by widening and pinning the Fact column while horizontally scrolling.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codex-usage-tracking
3
- Version: 0.8.1
3
+ Version: 0.10.0
4
4
  Summary: Unofficial local Codex plugin and dashboard for investigating aggregate token usage, costs, caching, and thread patterns.
5
5
  Author: Douglas Monsky
6
6
  License-Expression: MIT
@@ -103,11 +103,15 @@ Threads view groups related calls so long chats, subagents, and auto-review pass
103
103
 
104
104
  ![Threads view with one expanded thread and its calls in chronological order.](docs/assets/dashboard-threads.png?v=readme-drilldown)
105
105
 
106
+ Diagnostics surfaces on-demand snapshot reports for tool output, commands, Git interactions, file reads, file modifications, read productivity, and concentration without tying them to the normal live refresh loop.
107
+
108
+ ![Diagnostics view showing stored snapshot panels for tool output, commands, Git interactions, file modifications, and concentration.](docs/assets/dashboard-diagnostics.png?v=readme-drilldown)
109
+
106
110
  Insights still gives a fast triage layer for costly threads, low cache reuse, context bloat, and pricing gaps.
107
111
 
108
112
  ![Insights view with ranked Needs Attention cards, investigation presets, and top threads by attention score.](docs/assets/dashboard-insights.png?v=readme-drilldown)
109
113
 
110
- The dashboard screenshots use synthetic aggregate fixture data, and the companion prompt and chat previews are synthetic. They do not contain prompts from local logs, assistant responses, tool output, real thread names, real usage totals, or real Codex session content. See the [Dashboard Guide](docs/dashboard-guide.md) for the full walkthrough.
114
+ The dashboard screenshots use synthetic aggregate fixture data, and the companion prompt and chat previews are synthetic. They do not contain prompts from local logs, assistant responses, real tool output, real thread names, real usage totals, or real Codex session content. See the [Dashboard Guide](docs/dashboard-guide.md) for the full walkthrough.
111
115
 
112
116
  If this helped you track Codex usage, starring the repo helps others find it. Issues and feature requests are welcome.
113
117
 
@@ -65,11 +65,15 @@ Threads view groups related calls so long chats, subagents, and auto-review pass
65
65
 
66
66
  ![Threads view with one expanded thread and its calls in chronological order.](docs/assets/dashboard-threads.png?v=readme-drilldown)
67
67
 
68
+ Diagnostics surfaces on-demand snapshot reports for tool output, commands, Git interactions, file reads, file modifications, read productivity, and concentration without tying them to the normal live refresh loop.
69
+
70
+ ![Diagnostics view showing stored snapshot panels for tool output, commands, Git interactions, file modifications, and concentration.](docs/assets/dashboard-diagnostics.png?v=readme-drilldown)
71
+
68
72
  Insights still gives a fast triage layer for costly threads, low cache reuse, context bloat, and pricing gaps.
69
73
 
70
74
  ![Insights view with ranked Needs Attention cards, investigation presets, and top threads by attention score.](docs/assets/dashboard-insights.png?v=readme-drilldown)
71
75
 
72
- The dashboard screenshots use synthetic aggregate fixture data, and the companion prompt and chat previews are synthetic. They do not contain prompts from local logs, assistant responses, tool output, real thread names, real usage totals, or real Codex session content. See the [Dashboard Guide](docs/dashboard-guide.md) for the full walkthrough.
76
+ The dashboard screenshots use synthetic aggregate fixture data, and the companion prompt and chat previews are synthetic. They do not contain prompts from local logs, assistant responses, real tool output, real thread names, real usage totals, or real Codex session content. See the [Dashboard Guide](docs/dashboard-guide.md) for the full walkthrough.
73
77
 
74
78
  If this helped you track Codex usage, starring the repo helps others find it. Issues and feature requests are welcome.
75
79
 
@@ -13,7 +13,8 @@ Codex Usage Tracker is a local sidecar app. It reads aggregate token counters fr
13
13
  - `costing.py`, `pricing_config.py`, `pricing_openai.py`, `pricing_estimates.py`, and `allowance.py` own cost, credit, rate-card, and allowance annotation. Keep estimate confidence and source metadata attached to rows.
14
14
  - `projects.py`, `threads.py`, and `recommendations.py` annotate aggregate rows with project identity, thread relationships, and actionable signals. Project privacy redaction also belongs in `projects.py` so CLI, MCP, dashboard, CSV, and support-bundle surfaces share the same behavior.
15
15
  - `dashboard.py` builds aggregate-only static dashboard payloads and writes HTML/assets. `server.py` adds localhost refresh, the compatibility `/api/usage` endpoint, SQL-backed live API slices, and explicit lazy context loading.
16
- - `plugin_data/dashboard/dashboard_format.js` owns dashboard formatting primitives. `dashboard_data.js` owns row payload and thread relationship helpers. `dashboard_analysis.js` owns scoring, sorting, recommendation, and thread grouping logic. `dashboard_cells.js` owns reusable table/cell HTML helpers. `dashboard_details.js` owns sidebar detail and thread narrative rendering. `dashboard_insights.js` owns insight cards and investigation preset UI. `dashboard_tables.js` owns Calls, Threads, and expanded thread-call table rendering. `dashboard_diagnostics.js` owns the Diagnostics tab that consumes `/api/diagnostics/*` aggregate payloads. `dashboard_filters.js` owns date range parsing and row date matching. `dashboard_state.js` owns URL, CSV, and download state utilities. `dashboard_i18n.js`, `dashboard_payload_cache.js`, and `dashboard_tooltips.js` own localization, session aggregate cache, and fast tooltip helpers. `dashboard_call_investigator.js` owns the dedicated call drilldown surface. `dashboard.js` owns top-level DOM rendering, event handling, and API refresh orchestration.
16
+ - `diagnostic_snapshots.py` owns persisted diagnostic snapshot refresh/load orchestration. `diagnostic_snapshot_analysis.py`, `diagnostic_snapshot_events.py`, `diagnostic_snapshot_rows.py`, and `diagnostic_snapshot_concentration.py` own source-log aggregation, safe event parsing, row shaping, and concentration math. `diagnostic_snapshot_report.py` owns CLI rendering. Keep these modules synthetic-testable and aggregate-only.
17
+ - `plugin_data/dashboard/dashboard_format.js` owns dashboard formatting primitives. `dashboard_data.js` owns row payload and thread relationship helpers. `dashboard_analysis.js` owns scoring, sorting, recommendation, and thread grouping logic. `dashboard_cells.js` owns reusable table/cell HTML helpers. `dashboard_details.js` owns sidebar detail and thread narrative rendering. `dashboard_insights.js` owns insight cards and investigation preset UI. `dashboard_tables.js` owns Calls, Threads, and expanded thread-call table rendering. `dashboard_diagnostics.js` coordinates the Diagnostics tab data flow and events, `dashboard_diagnostics_snapshots.js` renders on-demand snapshot panels, and `dashboard_diagnostics_facts.js` renders the fact tables and drilldowns. `dashboard_filters.js` owns date range parsing and row date matching. `dashboard_state.js` owns URL, CSV, and download state utilities. `dashboard_i18n.js`, `dashboard_payload_cache.js`, and `dashboard_tooltips.js` own localization, session aggregate cache, and fast tooltip helpers. `dashboard_call_investigator.js` owns the dedicated call drilldown surface. `dashboard.js` owns top-level DOM rendering, event handling, and API refresh orchestration.
17
18
  - `context.py` is the only normal path that reads raw log context, and it does so only for one selected record on demand with redaction and size limits. Its default quick mode omits tool output and serialized groups; full serialized JSONL group analysis is explicit.
18
19
  - `plugin_installer.py`, `.mcp.json`, `skills/`, and `scripts/check_release.py` own install and packaging behavior.
19
20
  - `scripts/benchmark_synthetic_history.py` owns generated large-history query timing and threshold enforcement for 10k, 100k, and 500k aggregate-row fixtures. Its optional `--with-source-logs` mode writes synthetic JSONL source logs to time explicit context loading and to guard normal dashboard payload assembly against source-log reads. It must stay synthetic-only and must not read real Codex logs.
@@ -26,10 +27,11 @@ Codex Usage Tracker is a local sidecar app. It reads aggregate token counters fr
26
27
  1. Add new persisted usage-event metrics through `UsageEvent`, `schema.py`, migrations, store queries, dashboard payload tests, and CSV/export checks. Add auxiliary aggregate tables such as `thread_summaries` or `source_files` through `store.py` migrations plus focused migration/privacy tests.
27
28
  2. Add new report views through `reports.py` first, then wire CLI and MCP wrappers to that shared service.
28
29
  3. Add new machine-readable outputs through `api_payloads.py` or report payload methods with a `schema` value, a `json_contracts.py` entry, and focused tests.
29
- 4. Add dashboard-only interactions in `plugin_data/dashboard/dashboard.js` and keep URL state in `dashboard_state.js`.
30
+ 4. Add dashboard-only interactions in the narrowest dashboard module and keep URL state in `dashboard_state.js`. Diagnostics snapshot panels should stay in `dashboard_diagnostics_snapshots.js`; fact tables should stay in `dashboard_diagnostics_facts.js`.
30
31
  5. Keep all examples, screenshots, mocks, and tests synthetic. Never derive fixtures from real logs.
31
32
  6. When editing skill instructions, update both the source `skills/...` file and the bundled `src/codex_usage_tracker/plugin_data/skills/...` copy. `scripts/check_release.py` verifies that installable plugin assets stay complete and synced.
32
33
  7. When adding fields derived from `cwd`, Git metadata, source paths, or log-event metadata, decide how they behave in `normal`, `redacted`, and `strict` privacy modes before exposing them in dashboard, JSON, CSV, MCP, or support-bundle output.
34
+ 8. Diagnostic snapshot refresh must remain explicit and on demand. Normal usage refresh paths may load stored snapshots, but they must not rescan source logs for diagnostic sections unless the user calls a diagnostics `--refresh` command or a `/api/diagnostics/<section>/refresh` endpoint.
33
35
 
34
36
  ## Validation
35
37
 
@@ -47,6 +47,14 @@ Tracked schema ids:
47
47
  | `codex-usage-tracker-query-v1` | CLI `query`, MCP `usage_query(...)` |
48
48
  | `codex-usage-tracker-recommendations-v1` | CLI `recommendations --json`, MCP `usage_recommendations(response_format="json")` |
49
49
  | `codex-usage-tracker-diagnostics-v1` | CLI `diagnostics ... --json`, dashboard server `/api/diagnostics/*` |
50
+ | `codex-usage-tracker-diagnostic-overview-v1` | CLI `diagnostics overview --json`, dashboard server `/api/diagnostics/overview` |
51
+ | `codex-usage-tracker-diagnostic-tool-output-v1` | CLI `diagnostics tool-output --json`, dashboard server `/api/diagnostics/tool-output` |
52
+ | `codex-usage-tracker-diagnostic-commands-v1` | CLI `diagnostics commands --json`, dashboard server `/api/diagnostics/commands` |
53
+ | `codex-usage-tracker-diagnostic-git-interactions-v1` | CLI `diagnostics git-interactions --json`, dashboard server `/api/diagnostics/git-interactions` |
54
+ | `codex-usage-tracker-diagnostic-file-reads-v1` | CLI `diagnostics file-reads --json`, dashboard server `/api/diagnostics/file-reads` |
55
+ | `codex-usage-tracker-diagnostic-file-modifications-v1` | CLI `diagnostics file-modifications --json`, dashboard server `/api/diagnostics/file-modifications` |
56
+ | `codex-usage-tracker-diagnostic-read-productivity-v1` | CLI `diagnostics read-productivity --json`, dashboard server `/api/diagnostics/read-productivity` |
57
+ | `codex-usage-tracker-diagnostic-concentration-v1` | CLI `diagnostics concentration --json`, dashboard server `/api/diagnostics/concentration` |
50
58
  | `codex-usage-tracker-session-v1` | CLI `session --json`, MCP `session_usage(response_format="json")` |
51
59
  | `codex-usage-tracker-context-v1` | CLI `context`, MCP `usage_call_context` when raw context is explicitly enabled |
52
60
  | `codex-usage-tracker-context-disabled-v1` | MCP `usage_call_context` when raw context is disabled |
@@ -162,6 +170,8 @@ Supported filters:
162
170
 
163
171
  Privacy mode affects returned metadata after matching rows. `redacted` hides raw cwd/source paths, hides Git remote labels, and hashes unnamed project names. `strict` also hides project-relative cwd, Git branch, and tags. Configured project aliases are treated as explicit display opt-ins.
164
172
 
173
+ Per-call rows include derived timing fields when returned through dashboard/live call APIs: `call_started_at`, `call_duration_seconds`, `previous_call_event_timestamp`, and `previous_call_delta_seconds`. These values are derived from aggregate timestamps and thread adjacency; they do not read or store transcript content.
174
+
165
175
  ## Recommendations
166
176
 
167
177
  Command:
@@ -281,6 +291,352 @@ Schema: `codex-usage-tracker-diagnostics-v1`
281
291
 
282
292
  Diagnostics payloads report aggregate structured facts such as compaction, tool/function/MCP activity, command families, structured skill labels, search/read loops, and outcome events. They do not include prompts, assistant messages, tool arguments, tool output, patch text, raw commands, command arguments, file contents, or JSONL fragments. Token totals are associated with facts observed before a token-count row; they are not causal allocations.
283
293
 
294
+ Diagnostic snapshots use separate section endpoints instead of one large read payload. `GET` returns the latest stored section snapshot or `status: "missing"`; `POST /api/diagnostics/<section>/refresh` recomputes and replaces only that section. The dashboard button calls `POST /api/diagnostics/refresh`, which returns a small wrapper with `sections` and recomputes source-log-derived sections with one shared analyzer pass. This keeps ordinary dashboard refresh fast and prevents source-log rescans unless a diagnostics refresh is explicit.
295
+
296
+ ## Diagnostic Overview Snapshot
297
+
298
+ Commands:
299
+
300
+ ```bash
301
+ codex-usage-tracker diagnostics overview --json
302
+ codex-usage-tracker diagnostics overview --refresh --json
303
+ ```
304
+
305
+ Dashboard server API:
306
+
307
+ - `GET /api/diagnostics/overview`
308
+ - `POST /api/diagnostics/overview/refresh`
309
+
310
+ Schema: `codex-usage-tracker-diagnostic-overview-v1`
311
+
312
+ ```json
313
+ {
314
+ "schema": "codex-usage-tracker-diagnostic-overview-v1",
315
+ "section": "overview",
316
+ "status": "ready",
317
+ "refreshed": false,
318
+ "raw_context_included": false,
319
+ "snapshot": {
320
+ "computed_at": "2026-06-20T18:00:00+00:00",
321
+ "history_scope": "active",
322
+ "source_logs_scanned": 3,
323
+ "usage_rows_scanned": 10,
324
+ "raw_content_included": false
325
+ },
326
+ "overview": {
327
+ "usage_rows": 10,
328
+ "total_tokens": 12345,
329
+ "cached_input_tokens": 9000,
330
+ "uncached_input_tokens": 2000,
331
+ "cache_ratio": 0.75
332
+ },
333
+ "notes": []
334
+ }
335
+ ```
336
+
337
+ The overview snapshot is recomputed only when explicitly refreshed. Ordinary dashboard usage refreshes do not update diagnostic snapshots.
338
+
339
+ ## Diagnostic Tool Output Snapshot
340
+
341
+ Commands:
342
+
343
+ ```bash
344
+ codex-usage-tracker diagnostics tool-output --json
345
+ codex-usage-tracker diagnostics tool-output --refresh --json
346
+ ```
347
+
348
+ Dashboard server API:
349
+
350
+ - `GET /api/diagnostics/tool-output`
351
+ - `POST /api/diagnostics/tool-output/refresh`
352
+
353
+ Schema: `codex-usage-tracker-diagnostic-tool-output-v1`
354
+
355
+ ```json
356
+ {
357
+ "schema": "codex-usage-tracker-diagnostic-tool-output-v1",
358
+ "section": "tool-output",
359
+ "status": "ready",
360
+ "refreshed": false,
361
+ "raw_context_included": false,
362
+ "snapshot": {},
363
+ "summary": {
364
+ "function_calls": 1,
365
+ "function_outputs": 1,
366
+ "outputs_with_original_token_count": 1,
367
+ "outputs_missing_original_token_count": 0,
368
+ "original_token_sum": 42
369
+ },
370
+ "functions": [],
371
+ "command_roots": [],
372
+ "missing_reasons": [],
373
+ "notes": []
374
+ }
375
+ ```
376
+
377
+ The tool-output snapshot stores function names, conservative command roots, numeric counts, and terminal `Original token count` totals. It does not store raw tool output or command text.
378
+
379
+ ## Diagnostic Commands Snapshot
380
+
381
+ Commands:
382
+
383
+ ```bash
384
+ codex-usage-tracker diagnostics commands --json
385
+ codex-usage-tracker diagnostics commands --refresh --json
386
+ ```
387
+
388
+ Dashboard server API:
389
+
390
+ - `GET /api/diagnostics/commands`
391
+ - `POST /api/diagnostics/commands/refresh`
392
+
393
+ Schema: `codex-usage-tracker-diagnostic-commands-v1`
394
+
395
+ ```json
396
+ {
397
+ "schema": "codex-usage-tracker-diagnostic-commands-v1",
398
+ "section": "commands",
399
+ "status": "ready",
400
+ "refreshed": false,
401
+ "raw_context_included": false,
402
+ "snapshot": {},
403
+ "summary": {
404
+ "shell_function_calls": 1,
405
+ "command_root_count": 1,
406
+ "missing_command": 0
407
+ },
408
+ "commands": [
409
+ {
410
+ "root": "git",
411
+ "total": 1,
412
+ "children": [{"child": "status", "count": 1}]
413
+ }
414
+ ],
415
+ "notes": []
416
+ }
417
+ ```
418
+
419
+ The commands snapshot keeps only command roots and a bounded list of safe one-level child labels such as `status`, `diff`, or `-m:pytest`.
420
+
421
+ ## Diagnostic Git Interactions Snapshot
422
+
423
+ Commands:
424
+
425
+ ```bash
426
+ codex-usage-tracker diagnostics git-interactions --json
427
+ codex-usage-tracker diagnostics git-interactions --refresh --json
428
+ ```
429
+
430
+ Dashboard server API:
431
+
432
+ - `GET /api/diagnostics/git-interactions`
433
+ - `POST /api/diagnostics/git-interactions/refresh`
434
+
435
+ Schema: `codex-usage-tracker-diagnostic-git-interactions-v1`
436
+
437
+ ```json
438
+ {
439
+ "schema": "codex-usage-tracker-diagnostic-git-interactions-v1",
440
+ "section": "git-interactions",
441
+ "status": "ready",
442
+ "refreshed": false,
443
+ "raw_context_included": false,
444
+ "snapshot": {},
445
+ "summary": {
446
+ "git_shell_calls": 2,
447
+ "git_command_calls": 1,
448
+ "github_cli_calls": 1,
449
+ "unique_interactions": 2,
450
+ "interactions_with_original_token_count": 2,
451
+ "interactions_missing_original_token_count": 0,
452
+ "original_token_sum": 55
453
+ },
454
+ "interactions": [
455
+ {
456
+ "root": "git",
457
+ "operation": "status",
458
+ "category": "read_only",
459
+ "mutability": "read_only",
460
+ "calls": 1,
461
+ "with_original_token_count": 1,
462
+ "missing_original_token_count": 0,
463
+ "original_token_sum": 42
464
+ }
465
+ ],
466
+ "categories": [{"category": "read_only", "count": 1}],
467
+ "mutability": [{"mutability": "read_only", "count": 1}],
468
+ "notes": []
469
+ }
470
+ ```
471
+
472
+ The Git interactions snapshot is a specialized view of shell commands. It persists only `git`/`gh` root labels, safe operation labels, coarse categories, counts, and token coverage. It does not persist raw command strings, branch names, remotes, file paths, tags, commit messages, PR titles, release notes, or raw command output.
473
+
474
+ ## Diagnostic File Reads Snapshot
475
+
476
+ Commands:
477
+
478
+ ```bash
479
+ codex-usage-tracker diagnostics file-reads --json
480
+ codex-usage-tracker diagnostics file-reads --refresh --json
481
+ ```
482
+
483
+ Dashboard server API:
484
+
485
+ - `GET /api/diagnostics/file-reads`
486
+ - `POST /api/diagnostics/file-reads/refresh`
487
+
488
+ Schema: `codex-usage-tracker-diagnostic-file-reads-v1`
489
+
490
+ ```json
491
+ {
492
+ "schema": "codex-usage-tracker-diagnostic-file-reads-v1",
493
+ "section": "file-reads",
494
+ "status": "ready",
495
+ "refreshed": false,
496
+ "raw_context_included": false,
497
+ "snapshot": {},
498
+ "summary": {
499
+ "read_commands": 1,
500
+ "read_events": 1,
501
+ "unique_paths_read": 1,
502
+ "read_events_with_output_count": 1,
503
+ "read_events_missing_output_count": 0,
504
+ "allocated_output_token_sum": 42
505
+ },
506
+ "by_reader": [],
507
+ "top_paths": [],
508
+ "largest_read_commands": [],
509
+ "path_privacy": {},
510
+ "notes": []
511
+ }
512
+ ```
513
+
514
+ The file-reads snapshot classifies common shell readers such as `cat`, `sed`, `nl`, `rg`, and `find`. Path labels are basename-only with a short irreversible hash; raw commands, command arguments, absolute paths, file contents, and tool output are not stored.
515
+
516
+ ## Diagnostic File Modifications Snapshot
517
+
518
+ Commands:
519
+
520
+ ```bash
521
+ codex-usage-tracker diagnostics file-modifications --json
522
+ codex-usage-tracker diagnostics file-modifications --refresh --json
523
+ ```
524
+
525
+ Dashboard server API:
526
+
527
+ - `GET /api/diagnostics/file-modifications`
528
+ - `POST /api/diagnostics/file-modifications/refresh`
529
+
530
+ Schema: `codex-usage-tracker-diagnostic-file-modifications-v1`
531
+
532
+ ```json
533
+ {
534
+ "schema": "codex-usage-tracker-diagnostic-file-modifications-v1",
535
+ "section": "file-modifications",
536
+ "status": "ready",
537
+ "refreshed": false,
538
+ "raw_context_included": false,
539
+ "snapshot": {},
540
+ "summary": {
541
+ "modification_events": 2,
542
+ "modified_path_events": 3,
543
+ "unique_paths_modified": 2,
544
+ "largest_event_path_count": 2
545
+ },
546
+ "top_paths": [],
547
+ "by_extension": [],
548
+ "largest_events": [],
549
+ "path_privacy": {},
550
+ "notes": []
551
+ }
552
+ ```
553
+
554
+ The file-modifications snapshot counts structured patch events and modified paths. Path labels are basename-only with short irreversible hashes; patch text, raw absolute paths, file contents, raw commands, tool output, and JSONL fragments are not stored.
555
+
556
+ ## Diagnostic Read Productivity Snapshot
557
+
558
+ Commands:
559
+
560
+ ```bash
561
+ codex-usage-tracker diagnostics read-productivity --json
562
+ codex-usage-tracker diagnostics read-productivity --refresh --json
563
+ ```
564
+
565
+ Dashboard server API:
566
+
567
+ - `GET /api/diagnostics/read-productivity`
568
+ - `POST /api/diagnostics/read-productivity/refresh`
569
+
570
+ Schema: `codex-usage-tracker-diagnostic-read-productivity-v1`
571
+
572
+ ```json
573
+ {
574
+ "schema": "codex-usage-tracker-diagnostic-read-productivity-v1",
575
+ "section": "read-productivity",
576
+ "status": "ready",
577
+ "refreshed": false,
578
+ "raw_context_included": false,
579
+ "snapshot": {},
580
+ "summary": {
581
+ "read_events": 1,
582
+ "read_events_modified_later": 1,
583
+ "read_events_modified_later_pct": 1.0,
584
+ "unique_paths_read": 1,
585
+ "unique_paths_modified_later": 1,
586
+ "unique_path_modified_later_pct": 1.0,
587
+ "correlation_note": "Read-to-modify counts are temporal correlations."
588
+ },
589
+ "by_reader": [],
590
+ "top_modified_paths": [],
591
+ "path_privacy": {},
592
+ "notes": []
593
+ }
594
+ ```
595
+
596
+ Read productivity is a temporal correlation, not causation. A read is counted as modified later only when the same privacy-preserving path key appears in a later structured patch event in the same source log.
597
+
598
+ ## Diagnostic Concentration Snapshot
599
+
600
+ Commands:
601
+
602
+ ```bash
603
+ codex-usage-tracker diagnostics concentration --json
604
+ codex-usage-tracker diagnostics concentration --refresh --json
605
+ ```
606
+
607
+ Dashboard server API:
608
+
609
+ - `GET /api/diagnostics/concentration`
610
+ - `POST /api/diagnostics/concentration/refresh`
611
+
612
+ Schema: `codex-usage-tracker-diagnostic-concentration-v1`
613
+
614
+ ```json
615
+ {
616
+ "schema": "codex-usage-tracker-diagnostic-concentration-v1",
617
+ "section": "concentration",
618
+ "status": "ready",
619
+ "refreshed": false,
620
+ "raw_context_included": false,
621
+ "snapshot": {},
622
+ "summary": {
623
+ "usage_rows": 4,
624
+ "total_tokens": 100,
625
+ "dimension_count": 3,
626
+ "history_scope": "active"
627
+ },
628
+ "metrics": [
629
+ {"metric": "top_1_source_log_share", "dimension": "source_log", "top_n": 1, "share": 0.5}
630
+ ],
631
+ "dimensions": [],
632
+ "largest_impact_rows": [],
633
+ "privacy": {},
634
+ "notes": []
635
+ }
636
+ ```
637
+
638
+ The concentration snapshot computes top-1/top-3/top-5 share and effective group count by source log/session, cwd/project label, and day. Metric ids such as `top_1_source_log_share` are stable JSON contract fields; dashboard views should render them as reader-facing labels. Source log labels use session-id prefixes or source hashes, cwd labels use basename-only labels, and raw source paths/cwd paths are not included.
639
+
284
640
  ## Pricing Coverage
285
641
 
286
642
  Command:
@@ -85,7 +85,7 @@ Dashboards default to active sessions only. Use `--include-archived` for an all-
85
85
 
86
86
  Use global `--lang <code>` before the dashboard command, or set `CODEX_USAGE_TRACKER_LANG`, to choose the dashboard's initial UI language. The dashboard language selector can then override that default in the browser. Localization applies to dashboard UI text, not JSON fields, CSV columns, model names, thread names, paths, or full CLI output.
87
87
 
88
- The localhost `/api/usage` endpoint accepts `limit` and `offset` query parameters, so automation can page aggregate rows without asking the server to load an entire large history at once.
88
+ The localhost `/api/usage` endpoint accepts `limit` and `offset` query parameters, so automation can page aggregate rows without asking the server to load an entire large history at once. Call rows include derived `call_duration_seconds` and `previous_call_delta_seconds`, and live API sorting accepts `duration` and `gap` sort keys.
89
89
 
90
90
  ## Summaries
91
91
 
@@ -120,12 +120,24 @@ codex-usage-tracker diagnostics summary
120
120
  codex-usage-tracker diagnostics facts --sort uncached
121
121
  codex-usage-tracker diagnostics compactions
122
122
  codex-usage-tracker diagnostics tools
123
+ codex-usage-tracker diagnostics overview --refresh
124
+ codex-usage-tracker diagnostics tool-output --refresh
125
+ codex-usage-tracker diagnostics commands --refresh
126
+ codex-usage-tracker diagnostics git-interactions --refresh
127
+ codex-usage-tracker diagnostics file-reads --refresh
128
+ codex-usage-tracker diagnostics file-modifications --refresh
129
+ codex-usage-tracker diagnostics read-productivity --refresh
130
+ codex-usage-tracker diagnostics concentration --refresh
123
131
  codex-usage-tracker diagnostics fact-calls --fact-type compaction --fact-name post_compaction
124
132
  ```
125
133
 
126
134
  Diagnostics expose structured event patterns and their associated token totals. They can show compactions, tool/function/MCP activity, safe command families, structured skill labels, patch outcomes, task completion, search/read loops, and aborted or rolled-back turns. Associated totals are not causal allocations and are not additive when one model call has multiple diagnostic facts.
127
135
 
128
- Diagnostic payloads are aggregate-only. They do not include prompts, assistant text, tool arguments, tool output, patch text, raw commands, command arguments, file contents, or JSONL fragments.
136
+ Snapshot diagnostics are persisted aggregate reports. Without `--refresh`, snapshot commands return the latest stored payload or a `missing` status. With `--refresh`, they recompute from indexed source logs and replace the stored section snapshot. Ordinary `refresh`, `open-dashboard`, and dashboard `Refresh` update usage rows only; they do not recompute diagnostic snapshots.
137
+
138
+ The snapshot sections answer different questions: `overview` summarizes usage rows and aggregate token totals, `tool-output` counts functions and terminal `Original token count` coverage, `commands` keeps command roots plus bounded safe child labels, `git-interactions` counts safe Git/GitHub CLI operations and token-count coverage, `file-reads` counts reader/path activity and allocated read-output tokens, `file-modifications` counts patch modification events and safe modified-path aggregates, `read-productivity` reports later-edit correlations for matching path keys, and `concentration` shows top-N token share by source/session, cwd/project, and day.
139
+
140
+ Diagnostic payloads are aggregate-only. They do not include prompts, assistant text, tool arguments, tool output, patch text, raw commands, command arguments, file contents, raw absolute paths, or JSONL fragments. Git interaction diagnostics persist only root and operation labels such as `git/status` or `gh/pr`, category counts, and token coverage; they do not persist branch names, remotes, file paths, tags, commit messages, PR titles, or release notes. File-read and file-modification diagnostics use basename-only path labels plus short irreversible hashes, read-productivity percentages are temporal correlations rather than proof that a read caused a later edit, and concentration reports use safe source/session, cwd, and day labels only.
129
141
 
130
142
  ## JSON Queries
131
143
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  > **Unofficial project:** Codex Usage Tracker is independent and is not made by, affiliated with, endorsed by, sponsored by, or supported by OpenAI. OpenAI and Codex are trademarks of OpenAI.
4
4
 
5
- This guide uses synthetic aggregate data. The screenshots do not contain prompts, assistant text, tool output, or real Codex session content.
5
+ This guide uses synthetic aggregate data. The screenshots do not contain real prompts, real assistant text, real tool output, or real Codex session content.
6
6
 
7
7
  ## Open The Dashboard
8
8
 
@@ -92,6 +92,7 @@ Use `Calls` view when you want to inspect individual model calls.
92
92
  - In redacted or strict privacy mode, search only sees the redacted metadata fields included in the dashboard payload.
93
93
  - The cards summarize only the currently visible filtered rows.
94
94
  - Time values are shown in your browser's local date/time format while sorting and time filtering still use the logged timestamp.
95
+ - Calls include `Duration`, derived from turn start for a new turn or the previous same-turn call end for continuations, and `Prev gap`, the elapsed time since the previous call in the resolved thread.
95
96
  - Calls view token columns separate total tokens, cached input, uncached input, and output so the accounting can be scanned without expanding a row.
96
97
  - Source pucks are call-level estimates derived from local event metadata. `User` means the token-count segment included a user message, `Codex` means it followed tool output, compaction, or agent-continuation metadata, and `Unknown` means the source event metadata was unavailable or ambiguous.
97
98
  - Click a column header like `Time`, `Thread`, `Tokens`, `Cost`, or `Cache` to sort. Use the sort menu for `Highest Codex credits`. Click the same header again to reverse the direction.
@@ -108,6 +109,7 @@ Useful interpretation notes:
108
109
 
109
110
  - `Last call total` is the token usage for the selected model call.
110
111
  - `Session cumulative` is the running total Codex logged for that session at the time of that call.
112
+ - `Duration` is a best-effort elapsed time for the selected call segment. `Prev gap` can include waiting time between separate user turns because it measures from the previous resolved-thread call.
111
113
  - `Cached input` and `Uncached input` are split so cache behavior is visible without storing transcript text.
112
114
  - A cost with `*` means the pricing row is marked as a best-guess estimate.
113
115
  - Codex credits are estimated from aggregate input, cached-input, and output token counters. Direct model matches use the bundled OpenAI Codex rate-card snapshot; inferred labels are marked estimated, and local credit-rate overrides are marked user-provided.
@@ -128,11 +130,21 @@ Use `Threads` view when you want to understand a work session as a group instead
128
130
 
129
131
  ## Diagnostics View
130
132
 
133
+ ![Diagnostics view showing stored snapshot panels for tool output, commands, Git interactions, file reads, file modifications, read productivity, and concentration.](assets/dashboard-diagnostics.png)
134
+
131
135
  Use `Diagnostics` view when you want to see what structured event patterns are happening and what token totals are associated with those patterns.
132
136
 
133
137
  - The tab consumes the localhost `/api/diagnostics/*` endpoints; static file dashboards show a live-API unavailable state.
134
138
  - The first table shows top diagnostic facts by associated uncached input tokens. Tool/function/MCP/command-family and compaction sections expose narrower slices of the same fact data.
135
139
  - Command diagnostics store only a command family such as `pytest`, `git`, or `unknown_command`. Skill and MCP labels are detected only when they are present as structured event metadata.
140
+ - Newer on-demand diagnostic snapshot endpoints are section-specific (`overview`, `tool-output`, `commands`, `git-interactions`, `file-reads`, `file-modifications`, `read-productivity`, and `concentration`). Heavy recomputation happens only through explicit diagnostic refresh endpoints. The dashboard's `Refresh diagnostics` button uses one batched refresh so source-log sections share one scan.
141
+ - Git interaction panels persist only safe roots and operations such as `git/status` or `gh/pr`, plus coarse categories and counts. They do not expose branch names, remotes, file paths, tags, commit messages, PR titles, release notes, or raw command output.
142
+ - File-modification panels count structured patch events and modified paths using basename-only labels plus short irreversible path hashes. They do not expose patch text, raw paths, file contents, or JSONL fragments.
143
+ - Click `Refresh diagnostics` when you want to recompute stored diagnostic snapshots. The normal dashboard `Refresh` action updates usage rows only.
144
+ - Snapshot panels show their stored status, last computed time, history scope, and logs scanned count. Missing or stale panels still render without forcing a source-log scan.
145
+ - `Tool Output` totals come from terminal wrapper metadata such as `Original token count`; missing-count rows show coverage gaps where that header was absent.
146
+ - File-read snapshots use basename-only path labels and short hashes. Read-productivity rates are temporal correlations between earlier reads and later structured patch events, not causation.
147
+ - Concentration snapshots show top-N share and effective group count by source log/session, cwd/project label, and day without exposing raw source-log or cwd paths.
136
148
  - Click `Calls` on a fact row to load associated model calls. Call links and largest-call links open the Call Investigator, where raw context remains explicit and on demand.
137
149
  - Associated token totals are not causal allocations and are not additive when one call has multiple diagnostic facts.
138
150