codex-usage-tracking 0.5.0__tar.gz → 0.7.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.
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/.codex-plugin/plugin.json +1 -1
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/AGENTS.md +9 -10
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/CHANGELOG.md +29 -1
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/PKG-INFO +41 -30
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/README.md +39 -29
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/docs/architecture.md +14 -14
- codex_usage_tracking-0.7.0/docs/assets/dashboard-call-investigator-evidence.png +0 -0
- codex_usage_tracking-0.7.0/docs/assets/dashboard-call-investigator-preview.png +0 -0
- codex_usage_tracking-0.7.0/docs/assets/dashboard-call-investigator.png +0 -0
- codex_usage_tracking-0.7.0/docs/assets/dashboard-calls-preview.png +0 -0
- codex_usage_tracking-0.7.0/docs/assets/dashboard-calls.png +0 -0
- codex_usage_tracking-0.7.0/docs/assets/dashboard-details.png +0 -0
- codex_usage_tracking-0.7.0/docs/assets/dashboard-insights.png +0 -0
- codex_usage_tracking-0.7.0/docs/assets/dashboard-threads.png +0 -0
- codex_usage_tracking-0.7.0/docs/call-drilldown-performance-checklist.md +274 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/docs/cli-json-schemas.md +8 -1
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/docs/cli-reference.md +4 -1
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/docs/dashboard-guide.md +40 -17
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/docs/development.md +37 -17
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/docs/mcp.md +2 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/docs/one-dot-oh-readiness.md +8 -8
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/docs/pricing-and-credits.md +5 -4
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/docs/privacy.md +14 -2
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/pyproject.toml +3 -2
- codex_usage_tracking-0.7.0/scripts/benchmark_synthetic_history.py +843 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/scripts/check_release.py +56 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/scripts/smoke_installed_package.py +23 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/skills/codex-usage-tracker/scripts/run_mcp.py +2 -2
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/src/codex_usage_tracker/__init__.py +1 -1
- codex_usage_tracking-0.7.0/src/codex_usage_tracker/call_origin.py +119 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/src/codex_usage_tracker/cli.py +4 -525
- codex_usage_tracking-0.7.0/src/codex_usage_tracker/cli_parser.py +546 -0
- codex_usage_tracking-0.7.0/src/codex_usage_tracker/context.py +903 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/src/codex_usage_tracker/dashboard.py +281 -34
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/src/codex_usage_tracker/json_contracts.py +61 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/src/codex_usage_tracker/mcp_server.py +9 -1
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/src/codex_usage_tracker/models.py +16 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/src/codex_usage_tracker/parser.py +338 -24
- codex_usage_tracking-0.7.0/src/codex_usage_tracker/plugin_data/dashboard/dashboard.css +281 -0
- codex_usage_tracking-0.7.0/src/codex_usage_tracker/plugin_data/dashboard/dashboard.js +1489 -0
- codex_usage_tracking-0.7.0/src/codex_usage_tracker/plugin_data/dashboard/dashboard_actions.js +203 -0
- codex_usage_tracking-0.7.0/src/codex_usage_tracker/plugin_data/dashboard/dashboard_analysis.js +388 -0
- codex_usage_tracking-0.7.0/src/codex_usage_tracker/plugin_data/dashboard/dashboard_call.css +408 -0
- codex_usage_tracking-0.7.0/src/codex_usage_tracker/plugin_data/dashboard/dashboard_call_diagnostics.js +227 -0
- codex_usage_tracking-0.7.0/src/codex_usage_tracker/plugin_data/dashboard/dashboard_call_investigator.js +857 -0
- codex_usage_tracking-0.7.0/src/codex_usage_tracker/plugin_data/dashboard/dashboard_cells.js +274 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/src/codex_usage_tracker/plugin_data/dashboard/dashboard_data.js +126 -0
- codex_usage_tracking-0.7.0/src/codex_usage_tracker/plugin_data/dashboard/dashboard_detail.css +404 -0
- codex_usage_tracking-0.7.0/src/codex_usage_tracker/plugin_data/dashboard/dashboard_details.js +259 -0
- codex_usage_tracking-0.7.0/src/codex_usage_tracker/plugin_data/dashboard/dashboard_events.js +250 -0
- codex_usage_tracking-0.7.0/src/codex_usage_tracker/plugin_data/dashboard/dashboard_filters.js +86 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/src/codex_usage_tracker/plugin_data/dashboard/dashboard_format.js +18 -0
- codex_usage_tracking-0.7.0/src/codex_usage_tracker/plugin_data/dashboard/dashboard_i18n.js +331 -0
- codex_usage_tracking-0.7.0/src/codex_usage_tracker/plugin_data/dashboard/dashboard_insights.css +190 -0
- codex_usage_tracking-0.7.0/src/codex_usage_tracker/plugin_data/dashboard/dashboard_insights.js +278 -0
- codex_usage_tracking-0.7.0/src/codex_usage_tracker/plugin_data/dashboard/dashboard_layout.css +89 -0
- codex_usage_tracking-0.7.0/src/codex_usage_tracker/plugin_data/dashboard/dashboard_live.js +318 -0
- codex_usage_tracking-0.7.0/src/codex_usage_tracker/plugin_data/dashboard/dashboard_payload_cache.js +68 -0
- codex_usage_tracking-0.7.0/src/codex_usage_tracker/plugin_data/dashboard/dashboard_responsive.css +67 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/src/codex_usage_tracker/plugin_data/dashboard/dashboard_state.js +16 -4
- codex_usage_tracking-0.7.0/src/codex_usage_tracker/plugin_data/dashboard/dashboard_status.js +307 -0
- codex_usage_tracking-0.7.0/src/codex_usage_tracker/plugin_data/dashboard/dashboard_tables.css +499 -0
- codex_usage_tracking-0.7.0/src/codex_usage_tracker/plugin_data/dashboard/dashboard_tables.js +284 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/src/codex_usage_tracker/plugin_data/dashboard/dashboard_template.html +44 -14
- codex_usage_tracking-0.7.0/src/codex_usage_tracker/plugin_data/dashboard/dashboard_tooltips.js +109 -0
- codex_usage_tracking-0.7.0/src/codex_usage_tracker/plugin_data/dashboard/locales/ar.json +558 -0
- codex_usage_tracking-0.7.0/src/codex_usage_tracker/plugin_data/dashboard/locales/de.json +558 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/src/codex_usage_tracker/plugin_data/dashboard/locales/en.json +122 -2
- codex_usage_tracking-0.7.0/src/codex_usage_tracker/plugin_data/dashboard/locales/es.json +558 -0
- codex_usage_tracking-0.7.0/src/codex_usage_tracker/plugin_data/dashboard/locales/fr.json +558 -0
- codex_usage_tracking-0.7.0/src/codex_usage_tracker/plugin_data/dashboard/locales/it.json +558 -0
- codex_usage_tracking-0.7.0/src/codex_usage_tracker/plugin_data/dashboard/locales/ja.json +558 -0
- codex_usage_tracking-0.7.0/src/codex_usage_tracker/plugin_data/dashboard/locales/ko.json +558 -0
- codex_usage_tracking-0.7.0/src/codex_usage_tracker/plugin_data/dashboard/locales/pt.json +558 -0
- codex_usage_tracking-0.7.0/src/codex_usage_tracker/plugin_data/dashboard/locales/ru.json +558 -0
- codex_usage_tracking-0.7.0/src/codex_usage_tracker/plugin_data/dashboard/locales/vi.json +558 -0
- codex_usage_tracking-0.7.0/src/codex_usage_tracker/plugin_data/dashboard/locales/zh-Hans.json +558 -0
- codex_usage_tracking-0.7.0/src/codex_usage_tracker/plugin_data/docs/assets/dashboard-call-investigator-evidence.png +0 -0
- codex_usage_tracking-0.7.0/src/codex_usage_tracker/plugin_data/docs/assets/dashboard-call-investigator-preview.png +0 -0
- codex_usage_tracking-0.7.0/src/codex_usage_tracker/plugin_data/docs/assets/dashboard-call-investigator.png +0 -0
- codex_usage_tracking-0.7.0/src/codex_usage_tracker/plugin_data/docs/assets/dashboard-calls-preview.png +0 -0
- codex_usage_tracking-0.7.0/src/codex_usage_tracker/plugin_data/docs/assets/dashboard-calls.png +0 -0
- codex_usage_tracking-0.7.0/src/codex_usage_tracker/plugin_data/docs/assets/dashboard-details.png +0 -0
- codex_usage_tracking-0.7.0/src/codex_usage_tracker/plugin_data/docs/assets/dashboard-insights.png +0 -0
- codex_usage_tracking-0.7.0/src/codex_usage_tracker/plugin_data/docs/assets/dashboard-threads.png +0 -0
- codex_usage_tracking-0.7.0/src/codex_usage_tracker/plugin_data/docs/assets/plugin-prompts.png +0 -0
- codex_usage_tracking-0.7.0/src/codex_usage_tracker/plugin_data/docs/assets/plugin-thread-leaderboard.png +0 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/src/codex_usage_tracker/plugin_data/docs/dashboard-guide.html +12 -8
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/src/codex_usage_tracker/redaction.py +6 -2
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/src/codex_usage_tracker/schema.py +21 -0
- codex_usage_tracking-0.7.0/src/codex_usage_tracker/server.py +1023 -0
- codex_usage_tracking-0.7.0/src/codex_usage_tracker/server_utils.py +221 -0
- codex_usage_tracking-0.7.0/src/codex_usage_tracker/store.py +1075 -0
- codex_usage_tracking-0.7.0/src/codex_usage_tracker/store_query_sql.py +192 -0
- codex_usage_tracking-0.7.0/src/codex_usage_tracker/store_schema.py +310 -0
- codex_usage_tracking-0.7.0/src/codex_usage_tracker/store_sources.py +204 -0
- codex_usage_tracking-0.7.0/src/codex_usage_tracker/store_thread_summaries.py +135 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/src/codex_usage_tracking.egg-info/PKG-INFO +41 -30
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/src/codex_usage_tracking.egg-info/SOURCES.txt +46 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/src/codex_usage_tracking.egg-info/requires.txt +1 -0
- codex_usage_tracking-0.7.0/tests/store_dashboard_helpers.py +439 -0
- codex_usage_tracking-0.7.0/tests/test_call_origin.py +86 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/tests/test_cli_release.py +52 -6
- codex_usage_tracking-0.7.0/tests/test_context_evidence.py +308 -0
- codex_usage_tracking-0.7.0/tests/test_dashboard_data.py +212 -0
- codex_usage_tracking-0.7.0/tests/test_dashboard_payload.py +687 -0
- codex_usage_tracking-0.7.0/tests/test_dashboard_server.py +871 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/tests/test_dashboard_state.py +22 -1
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/tests/test_i18n.py +123 -19
- codex_usage_tracking-0.7.0/tests/test_mcp_integration.py +196 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/tests/test_parser.py +192 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/tests/test_privacy.py +20 -1
- codex_usage_tracking-0.7.0/tests/test_redaction.py +43 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/tests/test_schema.py +8 -0
- codex_usage_tracking-0.7.0/tests/test_store_dashboard_mcp.py +708 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/tests/test_store_migrations.py +31 -6
- codex_usage_tracking-0.5.0/docs/assets/dashboard-calls-preview.png +0 -0
- codex_usage_tracking-0.5.0/docs/assets/dashboard-calls.png +0 -0
- codex_usage_tracking-0.5.0/docs/assets/dashboard-details.png +0 -0
- codex_usage_tracking-0.5.0/docs/assets/dashboard-insights.png +0 -0
- codex_usage_tracking-0.5.0/docs/assets/dashboard-threads.png +0 -0
- codex_usage_tracking-0.5.0/scripts/benchmark_synthetic_history.py +0 -431
- codex_usage_tracking-0.5.0/src/codex_usage_tracker/context.py +0 -368
- codex_usage_tracking-0.5.0/src/codex_usage_tracker/plugin_data/dashboard/dashboard.css +0 -975
- codex_usage_tracking-0.5.0/src/codex_usage_tracker/plugin_data/dashboard/dashboard.js +0 -2184
- codex_usage_tracking-0.5.0/src/codex_usage_tracker/plugin_data/dashboard/locales/ar.json +0 -438
- codex_usage_tracking-0.5.0/src/codex_usage_tracker/plugin_data/dashboard/locales/de.json +0 -438
- codex_usage_tracking-0.5.0/src/codex_usage_tracker/plugin_data/dashboard/locales/es.json +0 -438
- codex_usage_tracking-0.5.0/src/codex_usage_tracker/plugin_data/dashboard/locales/fr.json +0 -438
- codex_usage_tracking-0.5.0/src/codex_usage_tracker/plugin_data/dashboard/locales/it.json +0 -438
- codex_usage_tracking-0.5.0/src/codex_usage_tracker/plugin_data/dashboard/locales/ja.json +0 -438
- codex_usage_tracking-0.5.0/src/codex_usage_tracker/plugin_data/dashboard/locales/ko.json +0 -438
- codex_usage_tracking-0.5.0/src/codex_usage_tracker/plugin_data/dashboard/locales/pt.json +0 -438
- codex_usage_tracking-0.5.0/src/codex_usage_tracker/plugin_data/dashboard/locales/ru.json +0 -438
- codex_usage_tracking-0.5.0/src/codex_usage_tracker/plugin_data/dashboard/locales/vi.json +0 -438
- codex_usage_tracking-0.5.0/src/codex_usage_tracker/plugin_data/dashboard/locales/zh-Hans.json +0 -438
- codex_usage_tracking-0.5.0/src/codex_usage_tracker/plugin_data/docs/assets/dashboard-calls.png +0 -0
- codex_usage_tracking-0.5.0/src/codex_usage_tracker/plugin_data/docs/assets/dashboard-details.png +0 -0
- codex_usage_tracking-0.5.0/src/codex_usage_tracker/plugin_data/docs/assets/dashboard-insights.png +0 -0
- codex_usage_tracking-0.5.0/src/codex_usage_tracker/plugin_data/docs/assets/dashboard-threads.png +0 -0
- codex_usage_tracking-0.5.0/src/codex_usage_tracker/server.py +0 -453
- codex_usage_tracking-0.5.0/src/codex_usage_tracker/store.py +0 -687
- codex_usage_tracking-0.5.0/tests/test_store_dashboard_mcp.py +0 -1386
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/.mcp.json +0 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/CONTRIBUTING.md +0 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/LICENSE +0 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/MANIFEST.in +0 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/SECURITY.md +0 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/assets/icon.svg +0 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/docs/assets/plugin-prompts.png +0 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/docs/assets/plugin-thread-leaderboard.png +0 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/docs/assets/ux/call-detail-panel.png +0 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/docs/assets/ux/insight-overview.png +0 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/docs/assets/ux/thread-investigation.png +0 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/docs/install.md +0 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/docs/ui-ux-improvement-plan.md +0 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/scripts/install_local_plugin.py +0 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/setup.cfg +0 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/skills/codex-usage-api/SKILL.md +0 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/skills/codex-usage-tracker/SKILL.md +0 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/src/codex_usage_tracker/__main__.py +0 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/src/codex_usage_tracker/allowance.py +0 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/src/codex_usage_tracker/api_payloads.py +0 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/src/codex_usage_tracker/costing.py +0 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/src/codex_usage_tracker/diagnostics.py +0 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/src/codex_usage_tracker/formatting.py +0 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/src/codex_usage_tracker/i18n.py +0 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/src/codex_usage_tracker/paths.py +0 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/src/codex_usage_tracker/plugin_data/__init__.py +0 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/src/codex_usage_tracker/plugin_data/assets/icon.svg +0 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/src/codex_usage_tracker/plugin_data/rate_cards/codex-credit-rates.json +0 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/src/codex_usage_tracker/plugin_data/skills/codex-usage-api/SKILL.md +0 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/src/codex_usage_tracker/plugin_data/skills/codex-usage-tracker/SKILL.md +0 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/src/codex_usage_tracker/plugin_installer.py +0 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/src/codex_usage_tracker/pricing.py +0 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/src/codex_usage_tracker/pricing_config.py +0 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/src/codex_usage_tracker/pricing_estimates.py +0 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/src/codex_usage_tracker/pricing_openai.py +0 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/src/codex_usage_tracker/projects.py +0 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/src/codex_usage_tracker/recommendations.py +0 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/src/codex_usage_tracker/reports.py +0 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/src/codex_usage_tracker/support.py +0 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/src/codex_usage_tracker/threads.py +0 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/src/codex_usage_tracking.egg-info/dependency_links.txt +0 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/src/codex_usage_tracking.egg-info/entry_points.txt +0 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/src/codex_usage_tracking.egg-info/top_level.txt +0 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/tests/test_allowance.py +0 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/tests/test_cli_lifecycle.py +0 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/tests/test_json_contracts.py +0 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/tests/test_mcp_launcher.py +0 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/tests/test_plugin_installer.py +0 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/tests/test_pricing.py +0 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/tests/test_projects.py +0 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/tests/test_recommendations.py +0 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/tests/test_support.py +0 -0
- {codex_usage_tracking-0.5.0 → codex_usage_tracking-0.7.0}/tests/test_threads.py +0 -0
|
@@ -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
|
-
|
|
146
|
-
node --check
|
|
147
|
-
|
|
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
|
-
|
|
163
|
-
node --check
|
|
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
|
-
|
|
220
|
-
node --check
|
|
221
|
-
|
|
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,37 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 0.7.0 - 2026-06-18
|
|
6
|
+
|
|
7
|
+
- Parse latest observed Codex usage snapshots from local rate-limit and token-count log events without persisting raw transcript text.
|
|
8
|
+
- Store observed 5h and weekly usage snapshot fields in aggregate rows and expose a latest-observed usage summary for dashboard and API consumers.
|
|
9
|
+
- Add a dashboard card for latest observed 5h and weekly usage with wording that distinguishes local observations from authoritative account limits.
|
|
10
|
+
- Default the dashboard table experience to time-sorted Calls, replace the visible Signals column with Reasoning Output, and keep the Signals field out of the table for now.
|
|
11
|
+
- Ignore known non-token parser events so refreshes stay focused on usage-bearing records.
|
|
12
|
+
|
|
13
|
+
## 0.6.1 - 2026-06-13
|
|
14
|
+
|
|
15
|
+
- Polish the README landing screenshots with matched dashboard/investigator previews and an additional lower investigator evidence view.
|
|
16
|
+
- Restore the companion plugin prompt preview near the companion skill section and package companion screenshots with installed docs assets.
|
|
17
|
+
- Keep dashboard toolbar links styled like buttons in the call investigator.
|
|
18
|
+
|
|
19
|
+
## 0.6.0 - 2026-06-13
|
|
20
|
+
|
|
21
|
+
- Remove low-value call/thread anchor diagnostics from the experimental call investigator to avoid an extra source-log scan per context load.
|
|
22
|
+
- 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.
|
|
23
|
+
- 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.
|
|
24
|
+
- Add opt-in localhost API timing diagnostics for `/api/usage` and `/api/context` without exposing raw transcript content.
|
|
25
|
+
- 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.
|
|
26
|
+
- Add source-log-aware synthetic benchmark coverage that verifies normal dashboard payload assembly does not open generated source JSONL files.
|
|
27
|
+
- 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.
|
|
28
|
+
- Materialize active and all-history thread summaries in SQLite so live thread APIs can read pre-aggregated totals.
|
|
29
|
+
- 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.
|
|
30
|
+
- 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.
|
|
31
|
+
- Replace placeholder non-English dashboard locale catalogs with translated UI catalogs and add regression coverage for core visible labels.
|
|
32
|
+
|
|
5
33
|
## 0.5.0 - 2026-06-10
|
|
6
34
|
|
|
7
|
-
- Add the dashboard localization foundation, including
|
|
35
|
+
- Add the dashboard localization foundation, including initial locale catalogs, language metadata, local browser language selection, `--lang`, and `CODEX_USAGE_TRACKER_LANG`.
|
|
8
36
|
- Add Vietnamese dashboard localization and focused validation coverage for translated dashboard labels.
|
|
9
37
|
- Keep the README landing page focused on dashboard screenshots and companion usage workflows before detailed localization guidance.
|
|
10
38
|
- Stabilize the CI synthetic benchmark smoke so coverage instrumentation does not create false release failures.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: codex-usage-tracking
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.7.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
|
|
@@ -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/
|
|
42
|
-
<a href="docs/assets/dashboard-
|
|
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
|
-
|
|
88
|
+
## Dashboard Preview
|
|
88
89
|
|
|
89
|
-
|
|
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
|
-
|
|
92
|
+

|
|
94
93
|
|
|
95
|
-
|
|
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
|
-
|
|
96
|
+

|
|
100
97
|
|
|
101
|
-
|
|
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
|
-
|
|
100
|
+

|
|
104
101
|
|
|
105
|
-
|
|
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
|
-
|
|
104
|
+

|
|
108
105
|
|
|
109
|
-
|
|
106
|
+
Insights still gives a fast triage layer for costly threads, low cache reuse, context bloat, and pricing gaps.
|
|
110
107
|
|
|
111
|
-
|
|
108
|
+

|
|
109
|
+
|
|
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.
|
|
112
111
|
|
|
113
|
-
|
|
112
|
+
If this helped you track Codex usage, starring the repo helps others find it. Issues and feature requests are welcome.
|
|
114
113
|
|
|
115
|
-
|
|
114
|
+
## Companion Skill And Plugin
|
|
116
115
|
|
|
117
|
-
|
|
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).
|
|
118
117
|
|
|
119
|
-
|
|
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>
|
|
120
121
|
|
|
121
|
-
|
|
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>
|
|
122
125
|
|
|
123
|
-
|
|
126
|
+
If you only want plugin registration after installing the package:
|
|
124
127
|
|
|
125
|
-
|
|
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 `
|
|
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
|
|
|
@@ -177,7 +188,7 @@ Optional allowance context:
|
|
|
177
188
|
codex-usage-tracker parse-allowance "5h 79% 6:50 PM Weekly 33% Jun 7"
|
|
178
189
|
```
|
|
179
190
|
|
|
180
|
-
The tracker cannot read your logged-in ChatGPT plan or live remaining usage automatically.
|
|
191
|
+
The tracker cannot read your logged-in ChatGPT plan or live remaining usage automatically. When local Codex logs include `token_count.rate_limits`, the dashboard can show the latest observed 5-hour and weekly remaining percentages from those logs. Otherwise, allowance values are only as accurate as the values you manually copy from Codex Settings, `/status`, or another trusted usage display. Details: [Pricing, Credits, And Allowance](docs/pricing-and-credits.md).
|
|
181
192
|
|
|
182
193
|
## What It Includes
|
|
183
194
|
|
|
@@ -192,7 +203,7 @@ The tracker cannot read your logged-in ChatGPT plan or live remaining usage auto
|
|
|
192
203
|
|
|
193
204
|
## Dashboard Language
|
|
194
205
|
|
|
195
|
-
The dashboard supports localized UI text. English is the canonical catalog, and the project includes
|
|
206
|
+
The dashboard supports localized UI text. English is the canonical catalog, and the project includes translated locale catalogs for common dashboard languages.
|
|
196
207
|
|
|
197
208
|
Set the initial dashboard language with `--lang`:
|
|
198
209
|
|
|
@@ -208,7 +219,7 @@ CODEX_USAGE_TRACKER_LANG=vi codex-usage-tracker serve-dashboard --open
|
|
|
208
219
|
|
|
209
220
|
The dashboard also includes a language selector. Browser selections are stored locally and can override the generated default for that browser.
|
|
210
221
|
|
|
211
|
-
Supported
|
|
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.
|
|
212
223
|
|
|
213
224
|
### Adding A Dashboard Language
|
|
214
225
|
|
|
@@ -285,7 +296,7 @@ This is optional. The normal shell install above is the fastest trusted path for
|
|
|
285
296
|
- Token counts come from Codex's logged counters; the tracker does not re-tokenize prompts.
|
|
286
297
|
- Pricing and rate-card sources can change outside this project.
|
|
287
298
|
- Pricing and Codex credit estimates depend on local rate data and confidence labels and are not guaranteed to match exact billing.
|
|
288
|
-
- Live account allowance cannot be read automatically by this local tracker; remaining 5-hour and weekly allowance is only
|
|
299
|
+
- Live account allowance cannot be read automatically by this local tracker; remaining 5-hour and weekly allowance is shown only from local Codex `token_count.rate_limits` snapshots when present, or from copied values you configure.
|
|
289
300
|
- Local Codex logs may not include usage from other ChatGPT agentic surfaces that share the same allowance.
|
|
290
301
|
- Plugin discovery limitations are separate from core Python CLI/dashboard support.
|
|
291
302
|
- Parent-child thread relationships are only as good as the metadata Codex logs; inferred auto-review attachments are labeled as inferred.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Codex Usage Tracker
|
|
2
2
|
|
|
3
3
|
<p align="center">
|
|
4
|
-
<a href="docs/assets/
|
|
5
|
-
<a href="docs/assets/dashboard-
|
|
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
|
-
|
|
50
|
+
## Dashboard Preview
|
|
51
51
|
|
|
52
|
-
|
|
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
|
-
|
|
54
|
+

|
|
57
55
|
|
|
58
|
-
|
|
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
|
-
|
|
58
|
+

|
|
63
59
|
|
|
64
|
-
|
|
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
|
-
|
|
62
|
+

|
|
67
63
|
|
|
68
|
-
|
|
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
|
-
|
|
66
|
+

|
|
71
67
|
|
|
72
|
-
|
|
68
|
+
Insights still gives a fast triage layer for costly threads, low cache reuse, context bloat, and pricing gaps.
|
|
73
69
|
|
|
74
|
-
|
|
70
|
+

|
|
71
|
+
|
|
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.
|
|
75
73
|
|
|
76
|
-
|
|
74
|
+
If this helped you track Codex usage, starring the repo helps others find it. Issues and feature requests are welcome.
|
|
77
75
|
|
|
78
|
-
|
|
76
|
+
## Companion Skill And Plugin
|
|
79
77
|
|
|
80
|
-
|
|
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).
|
|
81
79
|
|
|
82
|
-
|
|
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>
|
|
83
83
|
|
|
84
|
-
|
|
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>
|
|
85
87
|
|
|
86
|
-
|
|
88
|
+
If you only want plugin registration after installing the package:
|
|
87
89
|
|
|
88
|
-
|
|
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 `
|
|
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
|
|
|
@@ -140,7 +150,7 @@ Optional allowance context:
|
|
|
140
150
|
codex-usage-tracker parse-allowance "5h 79% 6:50 PM Weekly 33% Jun 7"
|
|
141
151
|
```
|
|
142
152
|
|
|
143
|
-
The tracker cannot read your logged-in ChatGPT plan or live remaining usage automatically.
|
|
153
|
+
The tracker cannot read your logged-in ChatGPT plan or live remaining usage automatically. When local Codex logs include `token_count.rate_limits`, the dashboard can show the latest observed 5-hour and weekly remaining percentages from those logs. Otherwise, allowance values are only as accurate as the values you manually copy from Codex Settings, `/status`, or another trusted usage display. Details: [Pricing, Credits, And Allowance](docs/pricing-and-credits.md).
|
|
144
154
|
|
|
145
155
|
## What It Includes
|
|
146
156
|
|
|
@@ -155,7 +165,7 @@ The tracker cannot read your logged-in ChatGPT plan or live remaining usage auto
|
|
|
155
165
|
|
|
156
166
|
## Dashboard Language
|
|
157
167
|
|
|
158
|
-
The dashboard supports localized UI text. English is the canonical catalog, and the project includes
|
|
168
|
+
The dashboard supports localized UI text. English is the canonical catalog, and the project includes translated locale catalogs for common dashboard languages.
|
|
159
169
|
|
|
160
170
|
Set the initial dashboard language with `--lang`:
|
|
161
171
|
|
|
@@ -171,7 +181,7 @@ CODEX_USAGE_TRACKER_LANG=vi codex-usage-tracker serve-dashboard --open
|
|
|
171
181
|
|
|
172
182
|
The dashboard also includes a language selector. Browser selections are stored locally and can override the generated default for that browser.
|
|
173
183
|
|
|
174
|
-
Supported
|
|
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.
|
|
175
185
|
|
|
176
186
|
### Adding A Dashboard Language
|
|
177
187
|
|
|
@@ -248,7 +258,7 @@ This is optional. The normal shell install above is the fastest trusted path for
|
|
|
248
258
|
- Token counts come from Codex's logged counters; the tracker does not re-tokenize prompts.
|
|
249
259
|
- Pricing and rate-card sources can change outside this project.
|
|
250
260
|
- Pricing and Codex credit estimates depend on local rate data and confidence labels and are not guaranteed to match exact billing.
|
|
251
|
-
- Live account allowance cannot be read automatically by this local tracker; remaining 5-hour and weekly allowance is only
|
|
261
|
+
- Live account allowance cannot be read automatically by this local tracker; remaining 5-hour and weekly allowance is shown only from local Codex `token_count.rate_limits` snapshots when present, or from copied values you configure.
|
|
252
262
|
- Local Codex logs may not include usage from other ChatGPT agentic surfaces that share the same allowance.
|
|
253
263
|
- Plugin discovery limitations are separate from core Python CLI/dashboard support.
|
|
254
264
|
- Parent-child thread relationships are only as good as the metadata Codex logs; inferred auto-review attachments are labeled as inferred.
|
|
@@ -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
|
|
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
|
|
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
|
|
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,
|
|
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
|
-
|
|
42
|
-
node --check
|
|
43
|
-
|
|
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.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|