codex-usage-tracking 0.4.1__tar.gz → 0.6.1__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 (186) hide show
  1. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/.codex-plugin/plugin.json +1 -1
  2. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/AGENTS.md +9 -10
  3. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/CHANGELOG.md +29 -0
  4. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/PKG-INFO +65 -26
  5. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/README.md +63 -25
  6. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/docs/architecture.md +14 -14
  7. codex_usage_tracking-0.6.1/docs/assets/dashboard-call-investigator-evidence.png +0 -0
  8. codex_usage_tracking-0.6.1/docs/assets/dashboard-call-investigator-preview.png +0 -0
  9. codex_usage_tracking-0.6.1/docs/assets/dashboard-call-investigator.png +0 -0
  10. codex_usage_tracking-0.6.1/docs/assets/dashboard-calls-preview.png +0 -0
  11. codex_usage_tracking-0.6.1/docs/assets/dashboard-calls.png +0 -0
  12. codex_usage_tracking-0.6.1/docs/assets/dashboard-details.png +0 -0
  13. codex_usage_tracking-0.6.1/docs/assets/dashboard-insights.png +0 -0
  14. codex_usage_tracking-0.6.1/docs/assets/dashboard-threads.png +0 -0
  15. codex_usage_tracking-0.6.1/docs/call-drilldown-performance-checklist.md +274 -0
  16. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/docs/cli-json-schemas.md +8 -1
  17. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/docs/cli-reference.md +6 -1
  18. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/docs/dashboard-guide.md +46 -14
  19. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/docs/development.md +39 -18
  20. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/docs/mcp.md +2 -0
  21. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/docs/one-dot-oh-readiness.md +11 -9
  22. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/docs/privacy.md +12 -1
  23. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/pyproject.toml +4 -2
  24. codex_usage_tracking-0.6.1/scripts/benchmark_synthetic_history.py +843 -0
  25. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/scripts/check_release.py +157 -17
  26. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/scripts/smoke_installed_package.py +35 -0
  27. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/skills/codex-usage-tracker/scripts/run_mcp.py +2 -2
  28. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/src/codex_usage_tracker/__init__.py +1 -1
  29. codex_usage_tracking-0.6.1/src/codex_usage_tracker/call_origin.py +119 -0
  30. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/src/codex_usage_tracker/cli.py +11 -517
  31. codex_usage_tracking-0.6.1/src/codex_usage_tracker/cli_parser.py +546 -0
  32. codex_usage_tracking-0.6.1/src/codex_usage_tracker/context.py +903 -0
  33. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/src/codex_usage_tracker/costing.py +14 -0
  34. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/src/codex_usage_tracker/dashboard.py +289 -34
  35. codex_usage_tracking-0.6.1/src/codex_usage_tracker/i18n.py +182 -0
  36. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/src/codex_usage_tracker/json_contracts.py +61 -0
  37. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/src/codex_usage_tracker/mcp_server.py +9 -1
  38. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/src/codex_usage_tracker/models.py +8 -0
  39. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/src/codex_usage_tracker/parser.py +251 -24
  40. codex_usage_tracking-0.6.1/src/codex_usage_tracker/plugin_data/dashboard/dashboard.css +262 -0
  41. codex_usage_tracking-0.6.1/src/codex_usage_tracker/plugin_data/dashboard/dashboard.js +1482 -0
  42. codex_usage_tracking-0.6.1/src/codex_usage_tracker/plugin_data/dashboard/dashboard_actions.js +203 -0
  43. codex_usage_tracking-0.6.1/src/codex_usage_tracker/plugin_data/dashboard/dashboard_analysis.js +383 -0
  44. codex_usage_tracking-0.6.1/src/codex_usage_tracker/plugin_data/dashboard/dashboard_call.css +408 -0
  45. codex_usage_tracking-0.6.1/src/codex_usage_tracker/plugin_data/dashboard/dashboard_call_diagnostics.js +227 -0
  46. codex_usage_tracking-0.6.1/src/codex_usage_tracker/plugin_data/dashboard/dashboard_call_investigator.js +857 -0
  47. codex_usage_tracking-0.6.1/src/codex_usage_tracker/plugin_data/dashboard/dashboard_cells.js +269 -0
  48. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/src/codex_usage_tracker/plugin_data/dashboard/dashboard_data.js +126 -0
  49. codex_usage_tracking-0.6.1/src/codex_usage_tracker/plugin_data/dashboard/dashboard_detail.css +404 -0
  50. codex_usage_tracking-0.6.1/src/codex_usage_tracker/plugin_data/dashboard/dashboard_details.js +259 -0
  51. codex_usage_tracking-0.6.1/src/codex_usage_tracker/plugin_data/dashboard/dashboard_events.js +250 -0
  52. codex_usage_tracking-0.6.1/src/codex_usage_tracker/plugin_data/dashboard/dashboard_filters.js +86 -0
  53. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/src/codex_usage_tracker/plugin_data/dashboard/dashboard_format.js +17 -0
  54. codex_usage_tracking-0.6.1/src/codex_usage_tracker/plugin_data/dashboard/dashboard_i18n.js +320 -0
  55. codex_usage_tracking-0.6.1/src/codex_usage_tracker/plugin_data/dashboard/dashboard_insights.css +190 -0
  56. codex_usage_tracking-0.6.1/src/codex_usage_tracker/plugin_data/dashboard/dashboard_insights.js +278 -0
  57. codex_usage_tracking-0.6.1/src/codex_usage_tracker/plugin_data/dashboard/dashboard_layout.css +89 -0
  58. codex_usage_tracking-0.6.1/src/codex_usage_tracker/plugin_data/dashboard/dashboard_live.js +318 -0
  59. codex_usage_tracking-0.6.1/src/codex_usage_tracker/plugin_data/dashboard/dashboard_payload_cache.js +68 -0
  60. codex_usage_tracking-0.6.1/src/codex_usage_tracker/plugin_data/dashboard/dashboard_responsive.css +67 -0
  61. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/src/codex_usage_tracker/plugin_data/dashboard/dashboard_state.js +1 -1
  62. codex_usage_tracking-0.6.1/src/codex_usage_tracker/plugin_data/dashboard/dashboard_status.js +203 -0
  63. codex_usage_tracking-0.6.1/src/codex_usage_tracker/plugin_data/dashboard/dashboard_tables.css +499 -0
  64. codex_usage_tracking-0.6.1/src/codex_usage_tracker/plugin_data/dashboard/dashboard_tables.js +286 -0
  65. codex_usage_tracking-0.6.1/src/codex_usage_tracker/plugin_data/dashboard/dashboard_template.html +176 -0
  66. codex_usage_tracking-0.6.1/src/codex_usage_tracker/plugin_data/dashboard/dashboard_tooltips.js +109 -0
  67. codex_usage_tracking-0.6.1/src/codex_usage_tracker/plugin_data/dashboard/locales/ar.json +546 -0
  68. codex_usage_tracking-0.6.1/src/codex_usage_tracker/plugin_data/dashboard/locales/de.json +546 -0
  69. codex_usage_tracking-0.6.1/src/codex_usage_tracker/plugin_data/dashboard/locales/en.json +546 -0
  70. codex_usage_tracking-0.6.1/src/codex_usage_tracker/plugin_data/dashboard/locales/es.json +546 -0
  71. codex_usage_tracking-0.6.1/src/codex_usage_tracker/plugin_data/dashboard/locales/fr.json +546 -0
  72. codex_usage_tracking-0.6.1/src/codex_usage_tracker/plugin_data/dashboard/locales/it.json +546 -0
  73. codex_usage_tracking-0.6.1/src/codex_usage_tracker/plugin_data/dashboard/locales/ja.json +546 -0
  74. codex_usage_tracking-0.6.1/src/codex_usage_tracker/plugin_data/dashboard/locales/ko.json +546 -0
  75. codex_usage_tracking-0.6.1/src/codex_usage_tracker/plugin_data/dashboard/locales/pt.json +546 -0
  76. codex_usage_tracking-0.6.1/src/codex_usage_tracker/plugin_data/dashboard/locales/ru.json +546 -0
  77. codex_usage_tracking-0.6.1/src/codex_usage_tracker/plugin_data/dashboard/locales/vi.json +546 -0
  78. codex_usage_tracking-0.6.1/src/codex_usage_tracker/plugin_data/dashboard/locales/zh-Hans.json +546 -0
  79. codex_usage_tracking-0.6.1/src/codex_usage_tracker/plugin_data/docs/assets/dashboard-call-investigator-evidence.png +0 -0
  80. codex_usage_tracking-0.6.1/src/codex_usage_tracker/plugin_data/docs/assets/dashboard-call-investigator-preview.png +0 -0
  81. codex_usage_tracking-0.6.1/src/codex_usage_tracker/plugin_data/docs/assets/dashboard-call-investigator.png +0 -0
  82. codex_usage_tracking-0.6.1/src/codex_usage_tracker/plugin_data/docs/assets/dashboard-calls-preview.png +0 -0
  83. codex_usage_tracking-0.6.1/src/codex_usage_tracker/plugin_data/docs/assets/dashboard-calls.png +0 -0
  84. codex_usage_tracking-0.6.1/src/codex_usage_tracker/plugin_data/docs/assets/dashboard-details.png +0 -0
  85. codex_usage_tracking-0.6.1/src/codex_usage_tracker/plugin_data/docs/assets/dashboard-insights.png +0 -0
  86. codex_usage_tracking-0.6.1/src/codex_usage_tracker/plugin_data/docs/assets/dashboard-threads.png +0 -0
  87. codex_usage_tracking-0.6.1/src/codex_usage_tracker/plugin_data/docs/assets/plugin-prompts.png +0 -0
  88. codex_usage_tracking-0.6.1/src/codex_usage_tracker/plugin_data/docs/assets/plugin-thread-leaderboard.png +0 -0
  89. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/src/codex_usage_tracker/plugin_data/docs/dashboard-guide.html +10 -6
  90. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/src/codex_usage_tracker/recommendations.py +11 -1
  91. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/src/codex_usage_tracker/redaction.py +6 -2
  92. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/src/codex_usage_tracker/schema.py +13 -0
  93. codex_usage_tracking-0.6.1/src/codex_usage_tracker/server.py +1017 -0
  94. codex_usage_tracking-0.6.1/src/codex_usage_tracker/server_utils.py +221 -0
  95. codex_usage_tracking-0.6.1/src/codex_usage_tracker/store.py +902 -0
  96. codex_usage_tracking-0.6.1/src/codex_usage_tracker/store_query_sql.py +192 -0
  97. codex_usage_tracking-0.6.1/src/codex_usage_tracker/store_schema.py +291 -0
  98. codex_usage_tracking-0.6.1/src/codex_usage_tracker/store_sources.py +204 -0
  99. codex_usage_tracking-0.6.1/src/codex_usage_tracker/store_thread_summaries.py +135 -0
  100. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/src/codex_usage_tracking.egg-info/PKG-INFO +65 -26
  101. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/src/codex_usage_tracking.egg-info/SOURCES.txt +60 -0
  102. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/src/codex_usage_tracking.egg-info/requires.txt +1 -0
  103. codex_usage_tracking-0.6.1/tests/store_dashboard_helpers.py +409 -0
  104. codex_usage_tracking-0.6.1/tests/test_call_origin.py +86 -0
  105. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/tests/test_cli_release.py +129 -6
  106. codex_usage_tracking-0.6.1/tests/test_context_evidence.py +308 -0
  107. codex_usage_tracking-0.6.1/tests/test_dashboard_data.py +212 -0
  108. codex_usage_tracking-0.6.1/tests/test_dashboard_payload.py +639 -0
  109. codex_usage_tracking-0.6.1/tests/test_dashboard_server.py +868 -0
  110. codex_usage_tracking-0.6.1/tests/test_i18n.py +501 -0
  111. codex_usage_tracking-0.6.1/tests/test_mcp_integration.py +196 -0
  112. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/tests/test_parser.py +118 -0
  113. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/tests/test_pricing.py +45 -0
  114. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/tests/test_privacy.py +20 -1
  115. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/tests/test_recommendations.py +9 -0
  116. codex_usage_tracking-0.6.1/tests/test_redaction.py +43 -0
  117. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/tests/test_schema.py +8 -0
  118. codex_usage_tracking-0.6.1/tests/test_store_dashboard_mcp.py +597 -0
  119. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/tests/test_store_migrations.py +25 -6
  120. codex_usage_tracking-0.4.1/docs/assets/dashboard-calls-preview.png +0 -0
  121. codex_usage_tracking-0.4.1/docs/assets/dashboard-calls.png +0 -0
  122. codex_usage_tracking-0.4.1/docs/assets/dashboard-details.png +0 -0
  123. codex_usage_tracking-0.4.1/docs/assets/dashboard-insights.png +0 -0
  124. codex_usage_tracking-0.4.1/docs/assets/dashboard-threads.png +0 -0
  125. codex_usage_tracking-0.4.1/scripts/benchmark_synthetic_history.py +0 -431
  126. codex_usage_tracking-0.4.1/src/codex_usage_tracker/context.py +0 -368
  127. codex_usage_tracking-0.4.1/src/codex_usage_tracker/plugin_data/dashboard/dashboard.css +0 -959
  128. codex_usage_tracking-0.4.1/src/codex_usage_tracker/plugin_data/dashboard/dashboard.js +0 -1870
  129. codex_usage_tracking-0.4.1/src/codex_usage_tracker/plugin_data/dashboard/dashboard_template.html +0 -141
  130. codex_usage_tracking-0.4.1/src/codex_usage_tracker/plugin_data/docs/assets/dashboard-calls.png +0 -0
  131. codex_usage_tracking-0.4.1/src/codex_usage_tracker/plugin_data/docs/assets/dashboard-details.png +0 -0
  132. codex_usage_tracking-0.4.1/src/codex_usage_tracker/plugin_data/docs/assets/dashboard-insights.png +0 -0
  133. codex_usage_tracking-0.4.1/src/codex_usage_tracker/plugin_data/docs/assets/dashboard-threads.png +0 -0
  134. codex_usage_tracking-0.4.1/src/codex_usage_tracker/server.py +0 -444
  135. codex_usage_tracking-0.4.1/src/codex_usage_tracker/store.py +0 -687
  136. codex_usage_tracking-0.4.1/tests/test_store_dashboard_mcp.py +0 -1359
  137. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/.mcp.json +0 -0
  138. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/CONTRIBUTING.md +0 -0
  139. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/LICENSE +0 -0
  140. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/MANIFEST.in +0 -0
  141. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/SECURITY.md +0 -0
  142. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/assets/icon.svg +0 -0
  143. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/docs/assets/plugin-prompts.png +0 -0
  144. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/docs/assets/plugin-thread-leaderboard.png +0 -0
  145. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/docs/assets/ux/call-detail-panel.png +0 -0
  146. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/docs/assets/ux/insight-overview.png +0 -0
  147. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/docs/assets/ux/thread-investigation.png +0 -0
  148. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/docs/install.md +0 -0
  149. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/docs/pricing-and-credits.md +0 -0
  150. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/docs/ui-ux-improvement-plan.md +0 -0
  151. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/scripts/install_local_plugin.py +0 -0
  152. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/setup.cfg +0 -0
  153. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/skills/codex-usage-api/SKILL.md +0 -0
  154. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/skills/codex-usage-tracker/SKILL.md +0 -0
  155. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/src/codex_usage_tracker/__main__.py +0 -0
  156. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/src/codex_usage_tracker/allowance.py +0 -0
  157. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/src/codex_usage_tracker/api_payloads.py +0 -0
  158. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/src/codex_usage_tracker/diagnostics.py +0 -0
  159. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/src/codex_usage_tracker/formatting.py +0 -0
  160. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/src/codex_usage_tracker/paths.py +0 -0
  161. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/src/codex_usage_tracker/plugin_data/__init__.py +0 -0
  162. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/src/codex_usage_tracker/plugin_data/assets/icon.svg +0 -0
  163. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/src/codex_usage_tracker/plugin_data/rate_cards/codex-credit-rates.json +0 -0
  164. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/src/codex_usage_tracker/plugin_data/skills/codex-usage-api/SKILL.md +0 -0
  165. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/src/codex_usage_tracker/plugin_data/skills/codex-usage-tracker/SKILL.md +0 -0
  166. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/src/codex_usage_tracker/plugin_installer.py +0 -0
  167. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/src/codex_usage_tracker/pricing.py +0 -0
  168. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/src/codex_usage_tracker/pricing_config.py +0 -0
  169. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/src/codex_usage_tracker/pricing_estimates.py +0 -0
  170. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/src/codex_usage_tracker/pricing_openai.py +0 -0
  171. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/src/codex_usage_tracker/projects.py +0 -0
  172. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/src/codex_usage_tracker/reports.py +0 -0
  173. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/src/codex_usage_tracker/support.py +0 -0
  174. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/src/codex_usage_tracker/threads.py +0 -0
  175. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/src/codex_usage_tracking.egg-info/dependency_links.txt +0 -0
  176. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/src/codex_usage_tracking.egg-info/entry_points.txt +0 -0
  177. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/src/codex_usage_tracking.egg-info/top_level.txt +0 -0
  178. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/tests/test_allowance.py +0 -0
  179. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/tests/test_cli_lifecycle.py +0 -0
  180. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/tests/test_dashboard_state.py +0 -0
  181. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/tests/test_json_contracts.py +0 -0
  182. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/tests/test_mcp_launcher.py +0 -0
  183. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/tests/test_plugin_installer.py +0 -0
  184. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/tests/test_projects.py +0 -0
  185. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/tests/test_support.py +0 -0
  186. {codex_usage_tracking-0.4.1 → codex_usage_tracking-0.6.1}/tests/test_threads.py +0 -0
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codex-usage-tracker",
3
- "version": "0.4.1",
3
+ "version": "0.6.1",
4
4
  "description": "Unofficial local tracker for aggregate Codex token usage from local session logs.",
5
5
  "author": {
6
6
  "name": "Douglas Monsky"
@@ -142,10 +142,9 @@ python -m mypy
142
142
  python -m pytest
143
143
  python -m pytest --cov=codex_usage_tracker --cov-report=term-missing
144
144
  python -m compileall src
145
- node --check src/codex_usage_tracker/plugin_data/dashboard/dashboard_format.js
146
- node --check src/codex_usage_tracker/plugin_data/dashboard/dashboard_data.js
147
- node --check src/codex_usage_tracker/plugin_data/dashboard/dashboard.js
148
- node --check src/codex_usage_tracker/plugin_data/dashboard/dashboard_state.js
145
+ for file in src/codex_usage_tracker/plugin_data/dashboard/dashboard*.js; do
146
+ node --check "$file"
147
+ done
149
148
  python scripts/check_release.py
150
149
  git diff --check
151
150
  rm -rf dist build src/codex_usage_tracker.egg-info src/codex_usage_tracking.egg-info
@@ -159,8 +158,9 @@ Additional smoke checks for touched CLI surfaces:
159
158
  ```bash
160
159
  python -m pytest
161
160
  python -m compileall src
162
- node --check src/codex_usage_tracker/plugin_data/dashboard/dashboard.js
163
- node --check src/codex_usage_tracker/plugin_data/dashboard/dashboard_state.js
161
+ for file in src/codex_usage_tracker/plugin_data/dashboard/dashboard*.js; do
162
+ node --check "$file"
163
+ done
164
164
  python -m build
165
165
  python scripts/check_release.py --dist
166
166
  git diff --check
@@ -216,10 +216,9 @@ python -m mypy
216
216
  python -m pytest
217
217
  python -m pytest --cov=codex_usage_tracker --cov-report=term-missing
218
218
  python -m compileall src
219
- node --check src/codex_usage_tracker/plugin_data/dashboard/dashboard_format.js
220
- node --check src/codex_usage_tracker/plugin_data/dashboard/dashboard_data.js
221
- node --check src/codex_usage_tracker/plugin_data/dashboard/dashboard.js
222
- node --check src/codex_usage_tracker/plugin_data/dashboard/dashboard_state.js
219
+ for file in src/codex_usage_tracker/plugin_data/dashboard/dashboard*.js; do
220
+ node --check "$file"
221
+ done
223
222
  python scripts/check_release.py
224
223
  git diff --check
225
224
  rm -rf dist build src/codex_usage_tracker.egg-info src/codex_usage_tracking.egg-info
@@ -2,9 +2,38 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.6.1 - 2026-06-13
6
+
7
+ - Polish the README landing screenshots with matched dashboard/investigator previews and an additional lower investigator evidence view.
8
+ - Restore the companion plugin prompt preview near the companion skill section and package companion screenshots with installed docs assets.
9
+ - Keep dashboard toolbar links styled like buttons in the call investigator.
10
+
11
+ ## 0.6.0 - 2026-06-13
12
+
13
+ - Remove low-value call/thread anchor diagnostics from the experimental call investigator to avoid an extra source-log scan per context load.
14
+ - Persist call-origin metadata as categorical aggregate fields during indexing so normal dashboard payloads do not reopen source JSONL logs to infer user-vs-Codex initiation.
15
+ - Persist archived-session scope, conservative thread keys, and per-thread previous/next call links as aggregate helper fields for faster dashboard filtering and investigator navigation.
16
+ - Add opt-in localhost API timing diagnostics for `/api/usage` and `/api/context` without exposing raw transcript content.
17
+ - Reduce explicit context loading to a quick default mode that omits tool output and serialized buckets, with full serialized JSONL bucket analysis still available on demand.
18
+ - Add source-log-aware synthetic benchmark coverage that verifies normal dashboard payload assembly does not open generated source JSONL files.
19
+ - Add SQL-backed live dashboard API slices for status, calls, one call, threads, thread calls, summary, and recommendations while preserving the compatibility `/api/usage` endpoint.
20
+ - Materialize active and all-history thread summaries in SQLite so live thread APIs can read pre-aggregated totals.
21
+ - Add source-file refresh cursors so live refresh skips unchanged logs, seeks to appended JSONL bytes when safe, and safely replaces aggregate rows for changed or truncated source logs.
22
+ - Hydrate direct call-investigator links from the aggregate `/api/call` endpoint when the selected record is outside the currently loaded table slice or filter state.
23
+ - Replace placeholder non-English dashboard locale catalogs with translated UI catalogs and add regression coverage for core visible labels.
24
+
25
+ ## 0.5.0 - 2026-06-10
26
+
27
+ - Add the dashboard localization foundation, including initial locale catalogs, language metadata, local browser language selection, `--lang`, and `CODEX_USAGE_TRACKER_LANG`.
28
+ - Add Vietnamese dashboard localization and focused validation coverage for translated dashboard labels.
29
+ - Keep the README landing page focused on dashboard screenshots and companion usage workflows before detailed localization guidance.
30
+ - Stabilize the CI synthetic benchmark smoke so coverage instrumentation does not create false release failures.
31
+ - Pin the marketplace MCP runtime launcher to the exact `codex-usage-tracking==0.5.0` package.
32
+
5
33
  ## 0.4.1 - 2026-06-09
6
34
 
7
35
  - Harden the production PyPI workflow so manual publishing must run from `main` or a tag ref before artifacts are downloaded and uploaded.
36
+ - Skip TestPyPI/PyPI uploads when the exact distribution version already exists on the target index, allowing a GitHub Release to be reconciled after a workflow-dispatch publish.
8
37
  - Strengthen `scripts/check_release.py` so it validates the publish-ref preflight inside both the TestPyPI and PyPI jobs.
9
38
  - Check off completed 1.0 readiness items with evidence for migration coverage, localhost dashboard smoke testing, and the protected GitHub `pypi` environment.
10
39
  - Pin the marketplace MCP runtime launcher to the exact `codex-usage-tracking==0.4.1` package.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codex-usage-tracking
3
- Version: 0.4.1
3
+ Version: 0.6.1
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
@@ -26,6 +26,7 @@ Requires-Python: >=3.10
26
26
  Description-Content-Type: text/markdown
27
27
  License-File: LICENSE
28
28
  Requires-Dist: mcp>=1.2.0
29
+ Requires-Dist: tiktoken>=0.13.0
29
30
  Provides-Extra: dev
30
31
  Requires-Dist: build>=1.2; extra == "dev"
31
32
  Requires-Dist: mypy>=1.10; extra == "dev"
@@ -38,8 +39,8 @@ Dynamic: license-file
38
39
  # Codex Usage Tracker
39
40
 
40
41
  <p align="center">
41
- <a href="docs/assets/plugin-prompts.png"><img src="docs/assets/plugin-prompts.png?v=short-prompts" alt="Codex Usage Tracker companion prompts for opening the dashboard, finding the heaviest thread, and showing a thread leaderboard." width="49%"></a>
42
- <a href="docs/assets/dashboard-calls.png"><img src="docs/assets/dashboard-calls-preview.png?v=usage-dashboard" alt="Codex Usage Tracker dashboard showing filters, usage totals, call rows, and call details." width="49%"></a>
42
+ <a href="docs/assets/dashboard-calls.png"><img src="docs/assets/dashboard-calls-preview.png?v=readme-drilldown" alt="Codex Usage Tracker dashboard showing filters, usage totals, and named model-call rows." width="49%"></a>
43
+ <a href="docs/assets/dashboard-call-investigator.png"><img src="docs/assets/dashboard-call-investigator-preview.png?v=readme-drilldown" alt="Codex Usage Tracker call investigator showing token accounting, cache diagnostics, and redacted runtime evidence." width="49%"></a>
43
44
  </p>
44
45
 
45
46
  Local-first dashboard, Codex plugin, and companion skill for understanding where your Codex tokens and usage credits are going.
@@ -84,45 +85,55 @@ pipx install "git+https://github.com/douglasmonsky/codex-usage-tracker.git"
84
85
 
85
86
  Want Codex to do it for you? Paste: `Install codex-usage-tracking with pipx, run codex-usage-tracker setup, and open the Codex Usage Tracker dashboard.`
86
87
 
87
- After plugin discovery, Codex can use the companion usage skill to refresh local aggregates, call the MCP tools, and explain usage patterns conversationally. Examples: [MCP And Codex Skills](docs/mcp.md).
88
+ ## Dashboard Preview
88
89
 
89
- <p align="center">
90
- <a href="docs/assets/plugin-thread-leaderboard.png"><img src="docs/assets/plugin-thread-leaderboard.png?v=thread-leaderboard" alt="Synthetic Codex chat preview showing the companion skill ranking threads by token usage after refreshing the local aggregate index." width="86%"></a>
91
- </p>
90
+ The Calls table is the main investigation surface: filter, sort, inspect details, and export the exact aggregate rows you are looking at.
92
91
 
93
- If you only want plugin registration after installing the package:
92
+ ![Calls view showing filters, totals, the model-call table, and the compact details rail.](docs/assets/dashboard-calls.png?v=readme-drilldown)
94
93
 
95
- ```bash
96
- codex-usage-tracker install-plugin
97
- ```
94
+ Click a call to open the dedicated investigator for exact token accounting, cache/accounting deltas, local serialized evidence buckets, and redacted turn-log evidence loaded only at runtime.
98
95
 
99
- More install paths: [Install Guide](docs/install.md).
96
+ ![Call investigator showing token accounting, cache diagnostics, serialized evidence groups, and raw evidence controls.](docs/assets/dashboard-call-investigator.png?v=readme-drilldown)
100
97
 
101
- ## Platform Support
98
+ The lower investigator view keeps the raw JSONL evidence opt-in and runtime-only while still showing visible-context estimates, serialized evidence upper bounds, and redacted turn-log entries.
102
99
 
103
- The core app is not macOS-only. The CLI, SQLite index, dashboard generator, and localhost server are Python-based and CI-tested on Ubuntu for Python 3.10-3.14. The installed-package Docker smoke path uses `python:3.14-slim` by default so packaged resources and CLI entry points are exercised on the newest supported runtime. It defaults to `~/.codex` for local Codex logs and `~/.codex-usage-tracker` for tracker data; pass `--codex-home` or `--db` when your local layout differs. Codex plugin discovery depends on Codex's local plugin directories on your machine, so run `codex-usage-tracker doctor` after setup if plugin registration does not appear in Codex.
100
+ ![Lower call investigator view showing context-change estimates, serialized evidence groups, and redacted runtime evidence entries.](docs/assets/dashboard-call-investigator-evidence.png?v=readme-drilldown)
104
101
 
105
- ## Dashboard Preview
102
+ Threads view groups related calls so long chats, subagents, and auto-review passes are easier to reason about as one work session.
106
103
 
107
- The Calls table is the main investigation surface: filter, sort, inspect details, and export the exact aggregate rows you are looking at.
104
+ ![Threads view with one expanded thread and its calls in chronological order.](docs/assets/dashboard-threads.png?v=readme-drilldown)
108
105
 
109
- ![Calls view showing filters, totals, the model-call table, and the details panel.](docs/assets/dashboard-calls.png?v=aa16502)
106
+ Insights still gives a fast triage layer for costly threads, low cache reuse, context bloat, and pricing gaps.
110
107
 
111
- Threads view groups related calls so long chats, subagents, and auto-review passes are easier to reason about as one work session.
108
+ ![Insights view with ranked Needs Attention cards, investigation presets, and top threads by attention score.](docs/assets/dashboard-insights.png?v=readme-drilldown)
112
109
 
113
- ![Threads view with one expanded thread and its calls in chronological order.](docs/assets/dashboard-threads.png?v=3cd7338)
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
111
 
115
- The details panel keeps the primary cost, cache, context, allowance, and pricing signals visible before raw identifiers.
112
+ If this helped you track Codex usage, starring the repo helps others find it. Issues and feature requests are welcome.
116
113
 
117
- ![Details panel showing aggregate fields for the selected usage row.](docs/assets/dashboard-details.png?v=84cf6dd)
114
+ ## Companion Skill And Plugin
118
115
 
119
- Insights still gives a fast triage layer for costly threads, low cache reuse, context bloat, and pricing gaps.
116
+ The dashboard is the core product surface. The Codex plugin and companion usage skill are add-ons that let Codex refresh local aggregates, call the MCP tools, and explain usage patterns conversationally after plugin discovery. Examples: [MCP And Codex Skills](docs/mcp.md).
120
117
 
121
- ![Insights view with ranked Needs Attention cards, investigation presets, and top threads by attention score.](docs/assets/dashboard-insights.png?v=4a40e4f)
118
+ <p align="center">
119
+ <a href="docs/assets/plugin-prompts.png"><img src="docs/assets/plugin-prompts.png?v=readme-drilldown" alt="Synthetic Codex plugin prompt preview showing usage dashboard and thread investigation suggestions." width="86%"></a>
120
+ </p>
122
121
 
123
- 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.
122
+ <p align="center">
123
+ <a href="docs/assets/plugin-thread-leaderboard.png"><img src="docs/assets/plugin-thread-leaderboard.png?v=readme-drilldown" alt="Synthetic Codex chat preview showing the companion skill ranking threads by token usage after refreshing the local aggregate index." width="86%"></a>
124
+ </p>
124
125
 
125
- If this helped you track Codex usage, starring the repo helps others find it. Issues and feature requests are welcome.
126
+ If you only want plugin registration after installing the package:
127
+
128
+ ```bash
129
+ codex-usage-tracker install-plugin
130
+ ```
131
+
132
+ More install paths: [Install Guide](docs/install.md).
133
+
134
+ ## Platform Support
135
+
136
+ The core app is not macOS-only. The CLI, SQLite index, dashboard generator, and localhost server are Python-based and CI-tested on Ubuntu for Python 3.10-3.14. The installed-package Docker smoke path uses `python:3.14-slim` by default so packaged resources and CLI entry points are exercised on the newest supported runtime. It defaults to `~/.codex` for local Codex logs and `~/.codex-usage-tracker` for tracker data; pass `--codex-home` or `--db` when your local layout differs. Codex plugin discovery depends on Codex's local plugin directories on your machine, so run `codex-usage-tracker doctor` after setup if plugin registration does not appear in Codex.
126
137
 
127
138
  ## Why This Exists
128
139
 
@@ -169,7 +180,7 @@ Then:
169
180
  4. Use investigation presets for highest-cost threads, highest-credit calls, context bloat, cache misses, pricing gaps, or estimated-price review.
170
181
  5. Open `Threads` to see how a conversation grew and whether subagent or auto-review work attached to it.
171
182
  6. Hover or click rows to inspect aggregate fields in `Call Details`.
172
- 7. Use `Load context` only when aggregate fields are not enough; context is fetched on demand from the local source JSONL and is not saved into SQLite or the dashboard.
183
+ 7. Use `Show turn log evidence` only when aggregate fields are not enough; context is fetched on demand from the local source JSONL and is not saved into SQLite or the dashboard.
173
184
 
174
185
  Optional allowance context:
175
186
 
@@ -190,6 +201,34 @@ The tracker cannot read your logged-in ChatGPT plan or live remaining usage auto
190
201
  - Companion Codex skills for operational setup and conversational usage analysis.
191
202
  - Optional local pricing, Codex credit, allowance, threshold, project alias, and privacy-mode configuration.
192
203
 
204
+ ## Dashboard Language
205
+
206
+ The dashboard supports localized UI text. English is the canonical catalog, and the project includes translated locale catalogs for common dashboard languages.
207
+
208
+ Set the initial dashboard language with `--lang`:
209
+
210
+ ```bash
211
+ codex-usage-tracker --lang vi serve-dashboard --open
212
+ ```
213
+
214
+ Or set a default with:
215
+
216
+ ```bash
217
+ CODEX_USAGE_TRACKER_LANG=vi codex-usage-tracker serve-dashboard --open
218
+ ```
219
+
220
+ The dashboard also includes a language selector. Browser selections are stored locally and can override the generated default for that browser.
221
+
222
+ Supported dashboard locales include English, Vietnamese, Spanish, French, German, Portuguese, Japanese, Simplified Chinese, Korean, Russian, Italian, and Arabic. This localizes dashboard UI text, not raw Codex log content, thread names, project names, paths, full CLI output, or data exports.
223
+
224
+ ### Adding A Dashboard Language
225
+
226
+ 1. Add a locale JSON file named by language code under `src/codex_usage_tracker/plugin_data/dashboard/locales/`.
227
+ 2. Include every key from the English catalog.
228
+ 3. Preserve every placeholder from the English string.
229
+ 4. Add the language code, native name, English name, and text direction to the supported language metadata.
230
+ 5. Run the i18n validation tests.
231
+
193
232
  ## Common Commands
194
233
 
195
234
  ```bash
@@ -1,8 +1,8 @@
1
1
  # Codex Usage Tracker
2
2
 
3
3
  <p align="center">
4
- <a href="docs/assets/plugin-prompts.png"><img src="docs/assets/plugin-prompts.png?v=short-prompts" alt="Codex Usage Tracker companion prompts for opening the dashboard, finding the heaviest thread, and showing a thread leaderboard." width="49%"></a>
5
- <a href="docs/assets/dashboard-calls.png"><img src="docs/assets/dashboard-calls-preview.png?v=usage-dashboard" alt="Codex Usage Tracker dashboard showing filters, usage totals, call rows, and call details." width="49%"></a>
4
+ <a href="docs/assets/dashboard-calls.png"><img src="docs/assets/dashboard-calls-preview.png?v=readme-drilldown" alt="Codex Usage Tracker dashboard showing filters, usage totals, and named model-call rows." width="49%"></a>
5
+ <a href="docs/assets/dashboard-call-investigator.png"><img src="docs/assets/dashboard-call-investigator-preview.png?v=readme-drilldown" alt="Codex Usage Tracker call investigator showing token accounting, cache diagnostics, and redacted runtime evidence." width="49%"></a>
6
6
  </p>
7
7
 
8
8
  Local-first dashboard, Codex plugin, and companion skill for understanding where your Codex tokens and usage credits are going.
@@ -47,45 +47,55 @@ pipx install "git+https://github.com/douglasmonsky/codex-usage-tracker.git"
47
47
 
48
48
  Want Codex to do it for you? Paste: `Install codex-usage-tracking with pipx, run codex-usage-tracker setup, and open the Codex Usage Tracker dashboard.`
49
49
 
50
- After plugin discovery, Codex can use the companion usage skill to refresh local aggregates, call the MCP tools, and explain usage patterns conversationally. Examples: [MCP And Codex Skills](docs/mcp.md).
50
+ ## Dashboard Preview
51
51
 
52
- <p align="center">
53
- <a href="docs/assets/plugin-thread-leaderboard.png"><img src="docs/assets/plugin-thread-leaderboard.png?v=thread-leaderboard" alt="Synthetic Codex chat preview showing the companion skill ranking threads by token usage after refreshing the local aggregate index." width="86%"></a>
54
- </p>
52
+ The Calls table is the main investigation surface: filter, sort, inspect details, and export the exact aggregate rows you are looking at.
55
53
 
56
- If you only want plugin registration after installing the package:
54
+ ![Calls view showing filters, totals, the model-call table, and the compact details rail.](docs/assets/dashboard-calls.png?v=readme-drilldown)
57
55
 
58
- ```bash
59
- codex-usage-tracker install-plugin
60
- ```
56
+ Click a call to open the dedicated investigator for exact token accounting, cache/accounting deltas, local serialized evidence buckets, and redacted turn-log evidence loaded only at runtime.
61
57
 
62
- More install paths: [Install Guide](docs/install.md).
58
+ ![Call investigator showing token accounting, cache diagnostics, serialized evidence groups, and raw evidence controls.](docs/assets/dashboard-call-investigator.png?v=readme-drilldown)
63
59
 
64
- ## Platform Support
60
+ The lower investigator view keeps the raw JSONL evidence opt-in and runtime-only while still showing visible-context estimates, serialized evidence upper bounds, and redacted turn-log entries.
65
61
 
66
- The core app is not macOS-only. The CLI, SQLite index, dashboard generator, and localhost server are Python-based and CI-tested on Ubuntu for Python 3.10-3.14. The installed-package Docker smoke path uses `python:3.14-slim` by default so packaged resources and CLI entry points are exercised on the newest supported runtime. It defaults to `~/.codex` for local Codex logs and `~/.codex-usage-tracker` for tracker data; pass `--codex-home` or `--db` when your local layout differs. Codex plugin discovery depends on Codex's local plugin directories on your machine, so run `codex-usage-tracker doctor` after setup if plugin registration does not appear in Codex.
62
+ ![Lower call investigator view showing context-change estimates, serialized evidence groups, and redacted runtime evidence entries.](docs/assets/dashboard-call-investigator-evidence.png?v=readme-drilldown)
67
63
 
68
- ## Dashboard Preview
64
+ Threads view groups related calls so long chats, subagents, and auto-review passes are easier to reason about as one work session.
69
65
 
70
- The Calls table is the main investigation surface: filter, sort, inspect details, and export the exact aggregate rows you are looking at.
66
+ ![Threads view with one expanded thread and its calls in chronological order.](docs/assets/dashboard-threads.png?v=readme-drilldown)
71
67
 
72
- ![Calls view showing filters, totals, the model-call table, and the details panel.](docs/assets/dashboard-calls.png?v=aa16502)
68
+ Insights still gives a fast triage layer for costly threads, low cache reuse, context bloat, and pricing gaps.
73
69
 
74
- Threads view groups related calls so long chats, subagents, and auto-review passes are easier to reason about as one work session.
70
+ ![Insights view with ranked Needs Attention cards, investigation presets, and top threads by attention score.](docs/assets/dashboard-insights.png?v=readme-drilldown)
75
71
 
76
- ![Threads view with one expanded thread and its calls in chronological order.](docs/assets/dashboard-threads.png?v=3cd7338)
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.
77
73
 
78
- The details panel keeps the primary cost, cache, context, allowance, and pricing signals visible before raw identifiers.
74
+ If this helped you track Codex usage, starring the repo helps others find it. Issues and feature requests are welcome.
79
75
 
80
- ![Details panel showing aggregate fields for the selected usage row.](docs/assets/dashboard-details.png?v=84cf6dd)
76
+ ## Companion Skill And Plugin
81
77
 
82
- Insights still gives a fast triage layer for costly threads, low cache reuse, context bloat, and pricing gaps.
78
+ The dashboard is the core product surface. The Codex plugin and companion usage skill are add-ons that let Codex refresh local aggregates, call the MCP tools, and explain usage patterns conversationally after plugin discovery. Examples: [MCP And Codex Skills](docs/mcp.md).
83
79
 
84
- ![Insights view with ranked Needs Attention cards, investigation presets, and top threads by attention score.](docs/assets/dashboard-insights.png?v=4a40e4f)
80
+ <p align="center">
81
+ <a href="docs/assets/plugin-prompts.png"><img src="docs/assets/plugin-prompts.png?v=readme-drilldown" alt="Synthetic Codex plugin prompt preview showing usage dashboard and thread investigation suggestions." width="86%"></a>
82
+ </p>
85
83
 
86
- 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.
84
+ <p align="center">
85
+ <a href="docs/assets/plugin-thread-leaderboard.png"><img src="docs/assets/plugin-thread-leaderboard.png?v=readme-drilldown" alt="Synthetic Codex chat preview showing the companion skill ranking threads by token usage after refreshing the local aggregate index." width="86%"></a>
86
+ </p>
87
87
 
88
- If this helped you track Codex usage, starring the repo helps others find it. Issues and feature requests are welcome.
88
+ If you only want plugin registration after installing the package:
89
+
90
+ ```bash
91
+ codex-usage-tracker install-plugin
92
+ ```
93
+
94
+ More install paths: [Install Guide](docs/install.md).
95
+
96
+ ## Platform Support
97
+
98
+ The core app is not macOS-only. The CLI, SQLite index, dashboard generator, and localhost server are Python-based and CI-tested on Ubuntu for Python 3.10-3.14. The installed-package Docker smoke path uses `python:3.14-slim` by default so packaged resources and CLI entry points are exercised on the newest supported runtime. It defaults to `~/.codex` for local Codex logs and `~/.codex-usage-tracker` for tracker data; pass `--codex-home` or `--db` when your local layout differs. Codex plugin discovery depends on Codex's local plugin directories on your machine, so run `codex-usage-tracker doctor` after setup if plugin registration does not appear in Codex.
89
99
 
90
100
  ## Why This Exists
91
101
 
@@ -132,7 +142,7 @@ Then:
132
142
  4. Use investigation presets for highest-cost threads, highest-credit calls, context bloat, cache misses, pricing gaps, or estimated-price review.
133
143
  5. Open `Threads` to see how a conversation grew and whether subagent or auto-review work attached to it.
134
144
  6. Hover or click rows to inspect aggregate fields in `Call Details`.
135
- 7. Use `Load context` only when aggregate fields are not enough; context is fetched on demand from the local source JSONL and is not saved into SQLite or the dashboard.
145
+ 7. Use `Show turn log evidence` only when aggregate fields are not enough; context is fetched on demand from the local source JSONL and is not saved into SQLite or the dashboard.
136
146
 
137
147
  Optional allowance context:
138
148
 
@@ -153,6 +163,34 @@ The tracker cannot read your logged-in ChatGPT plan or live remaining usage auto
153
163
  - Companion Codex skills for operational setup and conversational usage analysis.
154
164
  - Optional local pricing, Codex credit, allowance, threshold, project alias, and privacy-mode configuration.
155
165
 
166
+ ## Dashboard Language
167
+
168
+ The dashboard supports localized UI text. English is the canonical catalog, and the project includes translated locale catalogs for common dashboard languages.
169
+
170
+ Set the initial dashboard language with `--lang`:
171
+
172
+ ```bash
173
+ codex-usage-tracker --lang vi serve-dashboard --open
174
+ ```
175
+
176
+ Or set a default with:
177
+
178
+ ```bash
179
+ CODEX_USAGE_TRACKER_LANG=vi codex-usage-tracker serve-dashboard --open
180
+ ```
181
+
182
+ The dashboard also includes a language selector. Browser selections are stored locally and can override the generated default for that browser.
183
+
184
+ Supported dashboard locales include English, Vietnamese, Spanish, French, German, Portuguese, Japanese, Simplified Chinese, Korean, Russian, Italian, and Arabic. This localizes dashboard UI text, not raw Codex log content, thread names, project names, paths, full CLI output, or data exports.
185
+
186
+ ### Adding A Dashboard Language
187
+
188
+ 1. Add a locale JSON file named by language code under `src/codex_usage_tracker/plugin_data/dashboard/locales/`.
189
+ 2. Include every key from the English catalog.
190
+ 3. Preserve every placeholder from the English string.
191
+ 4. Add the language code, native name, English name, and text direction to the supported language metadata.
192
+ 5. Run the i18n validation tests.
193
+
156
194
  ## Common Commands
157
195
 
158
196
  ```bash
@@ -4,31 +4,32 @@ Codex Usage Tracker is a local sidecar app. It reads aggregate token counters fr
4
4
 
5
5
  ## Boundaries
6
6
 
7
- - `parser.py` converts local JSONL events into aggregate `UsageEvent` records. It must not persist prompts, assistant text, tool output, or transcript snippets.
7
+ - `parser.py` converts local JSONL events into aggregate `UsageEvent` records. It also attaches metadata-only call-origin categories, archived-session flags, and conservative thread keys. It must not persist prompts, assistant text, tool output, or transcript snippets.
8
+ - `call_origin.py` owns the pure call-origin classifier and migrated-row fallback. It must not open source JSONL files; source-log reads belong in parser refresh or explicit context loading only.
8
9
  - `schema.py` owns persisted `usage_events` columns. Add columns there before changing SQLite migrations or export behavior.
9
- - `store.py` owns SQLite setup, refresh, rebuild, and query access. Keep filesystem scanning, database writes, SQL prefilters, counts, limits, and offsets here.
10
+ - `store.py` owns SQLite setup, refresh, rebuild, query access, persisted per-thread previous/next call links, materialized thread summaries, source-file refresh cursors, and SQL-backed live dashboard API slices. Keep filesystem scanning, database writes, SQL prefilters, counts, limits, offsets, and incremental refresh decisions here.
10
11
  - `reports.py` is the application-service layer for summaries, expensive-call reports, recommendations, pricing coverage, and filtered query payloads. CLI and MCP should call this layer instead of duplicating report assembly.
11
- - `api_payloads.py` owns stable JSON payload helpers shared by CLI and MCP. `json_contracts.py` owns the lightweight contract checks for schema-versioned CLI/MCP payloads. Add payload builders and contract entries together when both surfaces need the same shape.
12
+ - `api_payloads.py` owns stable JSON payload helpers shared by CLI and MCP. `json_contracts.py` owns the lightweight contract checks for schema-versioned CLI/MCP payloads and localhost live API payloads. Add payload builders and contract entries together when surfaces need the same shape.
12
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.
13
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.
14
- - `dashboard.py` builds aggregate-only dashboard payloads and writes HTML/assets. `server.py` adds localhost refresh and explicit lazy context loading.
15
- - `plugin_data/dashboard/dashboard_format.js` owns dashboard formatting primitives. `dashboard_data.js` owns row payload and thread relationship helpers. `dashboard_state.js` owns URL, CSV, and download state utilities. `dashboard.js` owns DOM rendering, event handling, API refresh, and detail-panel behavior.
16
- - `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.
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_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
+ - `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.
17
18
  - `plugin_installer.py`, `.mcp.json`, `skills/`, and `scripts/check_release.py` own install and packaging behavior.
18
- - `scripts/benchmark_synthetic_history.py` owns generated large-history query timing and threshold enforcement for 10k, 100k, and 500k aggregate-row fixtures. It must stay synthetic-only and must not read real Codex logs.
19
+ - `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.
19
20
  - `skills/codex-usage-tracker/` is the source copy for the operational Codex skill. It should stay focused on setup, dashboard, export, doctor, and direct MCP workflows.
20
21
  - `skills/codex-usage-api/` is the source copy for the conversational analyst skill. It should stay focused on aggregate-only API routing, interpretation, and limitations.
21
22
  - `src/codex_usage_tracker/plugin_data/skills/` contains the wheel-bundled copies installed by `codex-usage-tracker install-plugin`.
22
23
 
23
24
  ## Extension Rules
24
25
 
25
- 1. Add new persisted metrics through `UsageEvent`, `schema.py`, migrations, store queries, dashboard payload tests, and CSV/export checks.
26
+ 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.
26
27
  2. Add new report views through `reports.py` first, then wire CLI and MCP wrappers to that shared service.
27
28
  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.
28
29
  4. Add dashboard-only interactions in `plugin_data/dashboard/dashboard.js` and keep URL state in `dashboard_state.js`.
29
30
  5. Keep all examples, screenshots, mocks, and tests synthetic. Never derive fixtures from real logs.
30
31
  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.
31
- 7. When adding fields derived from `cwd`, Git metadata, or source paths, decide how they behave in `normal`, `redacted`, and `strict` privacy modes before exposing them in dashboard, JSON, CSV, MCP, or support-bundle output.
32
+ 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.
32
33
 
33
34
  ## Validation
34
35
 
@@ -38,10 +39,9 @@ Use the narrowest useful check first, then the release suite before committing:
38
39
  python -m pytest
39
40
  python -m compileall src
40
41
  python -m mypy
41
- node --check src/codex_usage_tracker/plugin_data/dashboard/dashboard_format.js
42
- node --check src/codex_usage_tracker/plugin_data/dashboard/dashboard_data.js
43
- node --check src/codex_usage_tracker/plugin_data/dashboard/dashboard.js
44
- node --check src/codex_usage_tracker/plugin_data/dashboard/dashboard_state.js
42
+ for file in src/codex_usage_tracker/plugin_data/dashboard/dashboard*.js; do
43
+ node --check "$file"
44
+ done
45
45
  python scripts/check_release.py
46
46
  python -m build
47
47
  python scripts/check_release.py --dist
@@ -50,4 +50,4 @@ git diff --check
50
50
 
51
51
  Dashboard UI changes should also be opened in a browser and checked on desktop and mobile widths for overlap, stale state, and aggregate-only output.
52
52
 
53
- Run `python scripts/benchmark_synthetic_history.py --rows 10000 100000 --json --enforce-thresholds` after changing SQLite filters, dashboard payload loading, or indexes. Run the 500k benchmark before release work when practical.
53
+ Run `python scripts/benchmark_synthetic_history.py --rows 10000 100000 --json --enforce-thresholds` after changing SQLite filters, dashboard payload loading, or indexes. Run `python scripts/benchmark_synthetic_history.py --rows 1000 --with-source-logs --json --enforce-thresholds` after changing explicit context loading or source-log diagnostics. Run the 500k benchmark before release work when practical.