codex-usage-tracking 0.3.1__tar.gz → 0.4.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/.codex-plugin/plugin.json +1 -1
  2. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/AGENTS.md +146 -1
  3. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/CHANGELOG.md +15 -0
  4. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/PKG-INFO +10 -5
  5. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/README.md +8 -4
  6. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/SECURITY.md +1 -1
  7. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/docs/architecture.md +2 -2
  8. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/docs/cli-json-schemas.md +10 -2
  9. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/docs/cli-reference.md +5 -1
  10. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/docs/dashboard-guide.md +7 -5
  11. codex_usage_tracking-0.4.0/docs/development.md +357 -0
  12. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/docs/install.md +13 -4
  13. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/docs/mcp.md +3 -3
  14. codex_usage_tracking-0.4.0/docs/one-dot-oh-readiness.md +130 -0
  15. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/docs/privacy.md +22 -5
  16. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/pyproject.toml +2 -1
  17. codex_usage_tracking-0.4.0/scripts/benchmark_synthetic_history.py +431 -0
  18. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/scripts/check_release.py +48 -5
  19. codex_usage_tracking-0.4.0/scripts/smoke_installed_package.py +284 -0
  20. {codex_usage_tracking-0.3.1/src/codex_usage_tracker/plugin_data → codex_usage_tracking-0.4.0}/skills/codex-usage-api/SKILL.md +1 -1
  21. {codex_usage_tracking-0.3.1/src/codex_usage_tracker/plugin_data → codex_usage_tracking-0.4.0}/skills/codex-usage-tracker/SKILL.md +2 -2
  22. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/skills/codex-usage-tracker/scripts/run_mcp.py +2 -2
  23. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/src/codex_usage_tracker/__init__.py +1 -1
  24. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/src/codex_usage_tracker/cli.py +13 -5
  25. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/src/codex_usage_tracker/context.py +2 -44
  26. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/src/codex_usage_tracker/diagnostics.py +19 -3
  27. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/src/codex_usage_tracker/json_contracts.py +6 -0
  28. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/src/codex_usage_tracker/plugin_data/dashboard/dashboard.css +5 -0
  29. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/src/codex_usage_tracker/plugin_data/dashboard/dashboard.js +41 -4
  30. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/src/codex_usage_tracker/plugin_data/docs/dashboard-guide.html +4 -3
  31. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0/src/codex_usage_tracker/plugin_data}/skills/codex-usage-api/SKILL.md +1 -1
  32. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0/src/codex_usage_tracker/plugin_data}/skills/codex-usage-tracker/SKILL.md +2 -2
  33. codex_usage_tracking-0.4.0/src/codex_usage_tracker/redaction.py +53 -0
  34. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/src/codex_usage_tracker/server.py +51 -7
  35. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/src/codex_usage_tracker/store.py +21 -0
  36. codex_usage_tracking-0.4.0/src/codex_usage_tracker/support.py +283 -0
  37. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/src/codex_usage_tracking.egg-info/PKG-INFO +10 -5
  38. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/src/codex_usage_tracking.egg-info/SOURCES.txt +6 -0
  39. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/tests/test_cli_lifecycle.py +2 -0
  40. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/tests/test_cli_release.py +33 -3
  41. codex_usage_tracking-0.4.0/tests/test_json_contracts.py +156 -0
  42. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/tests/test_plugin_installer.py +1 -1
  43. codex_usage_tracking-0.4.0/tests/test_privacy.py +425 -0
  44. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/tests/test_store_dashboard_mcp.py +50 -9
  45. codex_usage_tracking-0.4.0/tests/test_store_migrations.py +282 -0
  46. codex_usage_tracking-0.4.0/tests/test_support.py +252 -0
  47. codex_usage_tracking-0.3.1/docs/development.md +0 -140
  48. codex_usage_tracking-0.3.1/scripts/benchmark_synthetic_history.py +0 -187
  49. codex_usage_tracking-0.3.1/src/codex_usage_tracker/support.py +0 -147
  50. codex_usage_tracking-0.3.1/tests/test_json_contracts.py +0 -50
  51. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/.mcp.json +0 -0
  52. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/CONTRIBUTING.md +0 -0
  53. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/LICENSE +0 -0
  54. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/MANIFEST.in +0 -0
  55. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/assets/icon.svg +0 -0
  56. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/docs/assets/dashboard-calls-preview.png +0 -0
  57. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/docs/assets/dashboard-calls.png +0 -0
  58. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/docs/assets/dashboard-details.png +0 -0
  59. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/docs/assets/dashboard-insights.png +0 -0
  60. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/docs/assets/dashboard-threads.png +0 -0
  61. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/docs/assets/plugin-prompts.png +0 -0
  62. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/docs/assets/plugin-thread-leaderboard.png +0 -0
  63. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/docs/assets/ux/call-detail-panel.png +0 -0
  64. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/docs/assets/ux/insight-overview.png +0 -0
  65. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/docs/assets/ux/thread-investigation.png +0 -0
  66. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/docs/pricing-and-credits.md +0 -0
  67. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/docs/ui-ux-improvement-plan.md +0 -0
  68. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/scripts/install_local_plugin.py +0 -0
  69. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/setup.cfg +0 -0
  70. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/src/codex_usage_tracker/__main__.py +0 -0
  71. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/src/codex_usage_tracker/allowance.py +0 -0
  72. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/src/codex_usage_tracker/api_payloads.py +0 -0
  73. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/src/codex_usage_tracker/costing.py +0 -0
  74. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/src/codex_usage_tracker/dashboard.py +0 -0
  75. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/src/codex_usage_tracker/formatting.py +0 -0
  76. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/src/codex_usage_tracker/mcp_server.py +0 -0
  77. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/src/codex_usage_tracker/models.py +0 -0
  78. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/src/codex_usage_tracker/parser.py +0 -0
  79. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/src/codex_usage_tracker/paths.py +0 -0
  80. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/src/codex_usage_tracker/plugin_data/__init__.py +0 -0
  81. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/src/codex_usage_tracker/plugin_data/assets/icon.svg +0 -0
  82. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/src/codex_usage_tracker/plugin_data/dashboard/dashboard_data.js +0 -0
  83. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/src/codex_usage_tracker/plugin_data/dashboard/dashboard_format.js +0 -0
  84. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/src/codex_usage_tracker/plugin_data/dashboard/dashboard_state.js +0 -0
  85. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/src/codex_usage_tracker/plugin_data/dashboard/dashboard_template.html +0 -0
  86. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/src/codex_usage_tracker/plugin_data/docs/assets/dashboard-calls.png +0 -0
  87. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/src/codex_usage_tracker/plugin_data/docs/assets/dashboard-details.png +0 -0
  88. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/src/codex_usage_tracker/plugin_data/docs/assets/dashboard-insights.png +0 -0
  89. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/src/codex_usage_tracker/plugin_data/docs/assets/dashboard-threads.png +0 -0
  90. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/src/codex_usage_tracker/plugin_data/rate_cards/codex-credit-rates.json +0 -0
  91. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/src/codex_usage_tracker/plugin_installer.py +0 -0
  92. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/src/codex_usage_tracker/pricing.py +0 -0
  93. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/src/codex_usage_tracker/pricing_config.py +0 -0
  94. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/src/codex_usage_tracker/pricing_estimates.py +0 -0
  95. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/src/codex_usage_tracker/pricing_openai.py +0 -0
  96. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/src/codex_usage_tracker/projects.py +0 -0
  97. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/src/codex_usage_tracker/recommendations.py +0 -0
  98. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/src/codex_usage_tracker/reports.py +0 -0
  99. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/src/codex_usage_tracker/schema.py +0 -0
  100. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/src/codex_usage_tracker/threads.py +0 -0
  101. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/src/codex_usage_tracking.egg-info/dependency_links.txt +0 -0
  102. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/src/codex_usage_tracking.egg-info/entry_points.txt +0 -0
  103. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/src/codex_usage_tracking.egg-info/requires.txt +0 -0
  104. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/src/codex_usage_tracking.egg-info/top_level.txt +0 -0
  105. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/tests/test_allowance.py +0 -0
  106. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/tests/test_mcp_launcher.py +0 -0
  107. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/tests/test_parser.py +0 -0
  108. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/tests/test_pricing.py +0 -0
  109. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/tests/test_projects.py +0 -0
  110. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/tests/test_recommendations.py +0 -0
  111. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/tests/test_schema.py +0 -0
  112. {codex_usage_tracking-0.3.1 → codex_usage_tracking-0.4.0}/tests/test_threads.py +0 -0
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codex-usage-tracker",
3
- "version": "0.3.1",
3
+ "version": "0.4.0",
4
4
  "description": "Unofficial local tracker for aggregate Codex token usage from local session logs.",
5
5
  "author": {
6
6
  "name": "Douglas Monsky"
@@ -47,9 +47,94 @@ python -m pip install ".[dev]" twine
47
47
  codex-usage-tracker install-plugin --python .venv/bin/python
48
48
  ```
49
49
 
50
+ ## Branch And PR Workflow
51
+
52
+ This project is now a published PyPI package with user-facing docs, JSON/MCP contracts, a release workflow, and privacy guarantees. Treat `main` as always releasable.
53
+
54
+ - Do not commit directly to `main`.
55
+ - Start each coherent task from current `main` with a short-lived branch.
56
+ - Use branch prefixes `feature/`, `fix/`, `docs/`, `chore/`, `test/`, `release/`, or `hotfix/`.
57
+ - Keep each branch focused on one issue, one reviewable task, or one release.
58
+ - Do not create a long-lived `develop` branch.
59
+ - Do not mix release prep with unrelated feature work.
60
+ - Push task branches and open a PR for all changes headed to `main`.
61
+ - Prefer squash merge for ordinary task PRs so `main` stays readable.
62
+ - Use the PR as the review artifact even when there is only one maintainer.
63
+
64
+ Recommended branch names:
65
+
66
+ ```text
67
+ feature/<issue-number>-short-description
68
+ fix/<issue-number>-short-description
69
+ docs/<issue-number>-short-description
70
+ chore/<issue-number>-short-description
71
+ test/<issue-number>-short-description
72
+ release/0.4.0
73
+ hotfix/0.3.3
74
+ ```
75
+
76
+ Before starting a task branch:
77
+
78
+ ```bash
79
+ git switch main
80
+ git pull --ff-only
81
+ git switch -c docs/123-short-description
82
+ ```
83
+
84
+ ## Agent Boundaries
85
+
86
+ Codex may create task branches, write tests, update docs, run local gates, prepare PR summaries, prepare release branches, and prepare changelog/version changes.
87
+
88
+ Codex must not do these without explicit maintainer approval:
89
+
90
+ - Push directly to `main`.
91
+ - Create or push release tags.
92
+ - Publish to TestPyPI or PyPI.
93
+ - Add PyPI or TestPyPI API tokens.
94
+ - Publish from a local machine.
95
+ - Change privacy semantics.
96
+ - Rename the PyPI distribution, import package, CLI command, plugin name, MCP tools, schema IDs, or stable JSON contracts.
97
+ - Delete branches.
98
+ - Force-push shared branches.
99
+
100
+ Publishing must happen only through the approved GitHub Actions Trusted Publishing workflow and protected `testpypi`/`pypi` environments.
101
+
102
+ ## Issue And Milestone Workflow
103
+
104
+ Use GitHub issues as the normal unit of work once the task is non-trivial. A branch should usually map to one issue and close it from the PR.
105
+
106
+ Recommended labels:
107
+
108
+ ```text
109
+ bug
110
+ docs
111
+ packaging
112
+ release
113
+ privacy
114
+ security
115
+ performance
116
+ dashboard
117
+ cli
118
+ mcp
119
+ parser-compat
120
+ good-first-issue
121
+ blocked
122
+ 1.0-blocker
123
+ ```
124
+
125
+ Recommended milestones:
126
+
127
+ ```text
128
+ 0.4.0
129
+ 1.0-readiness
130
+ 1.0.0
131
+ ```
132
+
133
+ Use patch releases for public blockers such as broken PyPI installs, missing package data, broken CLI entry points, privacy leaks, bad plugin installs, or bad runtime pins. Put planned stabilization work into the next minor release instead of bundling it into a patch.
134
+
50
135
  ## Validation
51
136
 
52
- Run the local CI gate before pushing to `main`:
137
+ Run focused tests first, then broader checks. Run the full local CI gate before opening or updating PRs that touch release, packaging, CLI contracts, MCP behavior, dashboard behavior, privacy behavior, schemas, generated docs/assets, or bundled plugin/skill files.
53
138
 
54
139
  ```bash
55
140
  python -m ruff check .
@@ -79,6 +164,7 @@ node --check src/codex_usage_tracker/plugin_data/dashboard/dashboard_state.js
79
164
  python -m build
80
165
  python scripts/check_release.py --dist
81
166
  git diff --check
167
+ python scripts/smoke_installed_package.py
82
168
  codex-usage-tracker update-pricing --output /tmp/codex-usage-pricing.json
83
169
  codex-usage-tracker update-rate-card --output /tmp/codex-usage-rate-card.json
84
170
  codex-usage-tracker doctor
@@ -95,6 +181,65 @@ codex-usage-tracker summary --preset by-subagent-role
95
181
  codex-usage-tracker expensive --limit 5
96
182
  ```
97
183
 
184
+ For documentation-only branches, at minimum run:
185
+
186
+ ```bash
187
+ python scripts/check_release.py
188
+ git diff --check
189
+ ```
190
+
191
+ ## Release Branches
192
+
193
+ Use release branches only for version/changelog/pinning/publish prep, for example `release/0.4.0` or `hotfix/0.3.3`.
194
+
195
+ Release branches may include:
196
+
197
+ - Version bumps.
198
+ - `CHANGELOG.md` updates.
199
+ - Install/version wording updates.
200
+ - Runtime package pins.
201
+ - Publish workflow tweaks.
202
+ - Release notes.
203
+ - Final smoke-test fixes directly tied to release readiness.
204
+
205
+ Release branches must not include unrelated features.
206
+
207
+ Recommended release sequence:
208
+
209
+ ```bash
210
+ git switch main
211
+ git pull --ff-only
212
+ git switch -c release/0.4.0
213
+ # version/changelog/release edits
214
+ python -m ruff check .
215
+ python -m mypy
216
+ python -m pytest
217
+ python -m pytest --cov=codex_usage_tracker --cov-report=term-missing
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
223
+ python scripts/check_release.py
224
+ git diff --check
225
+ rm -rf dist build src/codex_usage_tracker.egg-info src/codex_usage_tracking.egg-info
226
+ python -m build
227
+ python -m twine check dist/*
228
+ python scripts/check_release.py --dist
229
+ git add .
230
+ git commit -m "Prepare 0.4.0 release"
231
+ git push -u origin release/0.4.0
232
+ ```
233
+
234
+ Open a PR to `main` and merge only after CI passes. After merge, tag from updated `main`, not from an unreviewed release branch, and only after explicit maintainer approval:
235
+
236
+ ```bash
237
+ git switch main
238
+ git pull --ff-only
239
+ git tag -a v0.4.0 -m "codex-usage-tracker 0.4.0"
240
+ git push origin v0.4.0
241
+ ```
242
+
98
243
  ## Privacy Rules
99
244
 
100
245
  - Never commit real Codex session logs.
@@ -2,6 +2,21 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.4.0 - 2026-06-09
6
+
7
+ - Add official Python 3.14 support across CI, package classifiers, README/install docs, and installed-package Docker smoke coverage.
8
+ - Add a release recovery runbook for failed publish workflows, stale PyPI/TestPyPI pages, Trusted Publishing issues, bad artifacts, and patch-forward recovery.
9
+ - Add synthetic large-history benchmark thresholds for active/all-history dashboard queries, date filtering, model/effort filtering, recommendations, pricing coverage, and project summaries.
10
+ - Add stricter privacy regression coverage for generated dashboards, CSV exports, API payloads, and support bundles.
11
+ - Redact sensitive strings and local diagnostic paths in support bundles, including nested doctor output in redacted and strict privacy modes.
12
+ - Add aggregate schema migration, JSON contract parity, installed-package smoke, and protected-main workflow readiness coverage.
13
+ - Pin the marketplace MCP runtime launcher to the exact `codex-usage-tracking==0.4.0` package.
14
+
15
+ ## 0.3.2 - 2026-06-08
16
+
17
+ - Make `open-dashboard` and `serve-dashboard` refresh active-session logs by default, with `--no-refresh` as the explicit cached-index mode.
18
+ - Add a token-protected dashboard action for enabling context loading without restarting a localhost server that started with context loading off.
19
+
5
20
  ## 0.3.1 - 2026-06-08
6
21
 
7
22
  - Fix packaged Codex Usage Tracker skills so dashboard-open requests start the live localhost dashboard instead of a static snapshot.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codex-usage-tracking
3
- Version: 0.3.1
3
+ Version: 0.4.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
@@ -19,6 +19,7 @@ Classifier: Programming Language :: Python :: 3.10
19
19
  Classifier: Programming Language :: Python :: 3.11
20
20
  Classifier: Programming Language :: Python :: 3.12
21
21
  Classifier: Programming Language :: Python :: 3.13
22
+ Classifier: Programming Language :: Python :: 3.14
22
23
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
23
24
  Classifier: Topic :: System :: Monitoring
24
25
  Requires-Python: >=3.10
@@ -45,7 +46,7 @@ Local-first dashboard, Codex plugin, and companion skill for understanding where
45
46
 
46
47
  [![CI](https://github.com/douglasmonsky/codex-usage-tracker/actions/workflows/ci.yml/badge.svg)](https://github.com/douglasmonsky/codex-usage-tracker/actions/workflows/ci.yml)
47
48
  [![PyPI](https://img.shields.io/pypi/v/codex-usage-tracking.svg)](https://pypi.org/project/codex-usage-tracking/)
48
- ![Python 3.10-3.13](https://img.shields.io/badge/python-3.10--3.13-blue)
49
+ ![Python 3.10-3.14](https://img.shields.io/badge/python-3.10--3.14-blue)
49
50
  [![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
50
51
 
51
52
  > **Unofficial project:** Codex Usage Tracker is an independent open-source project. It is not made by, affiliated with, endorsed by, sponsored by, or supported by OpenAI. OpenAI and Codex are trademarks of OpenAI; this project only reads local log files from your machine.
@@ -67,6 +68,9 @@ codex-usage-tracker serve-dashboard --open
67
68
  ```
68
69
 
69
70
  Use your normal Python launcher for your platform: `python3` is common on macOS/Linux, and `py` may be preferable on Windows. On macOS with Homebrew, `brew install pipx` is also fine.
71
+ If `codex-usage-tracker` is not found after installing with pipx, open a new terminal or add the binary directory printed by `pipx ensurepath` to your `PATH`.
72
+
73
+ `serve-dashboard` refreshes active-session usage before opening by default. Use `--no-refresh` only when you intentionally want to inspect the cached local index.
70
74
 
71
75
  Package naming: the PyPI distribution is `codex-usage-tracking`; the installed command is `codex-usage-tracker`; the GitHub repository remains `douglasmonsky/codex-usage-tracker`. The `codex-usage-tracker` PyPI name is not this project, so avoid similarly named packages when following these docs.
72
76
 
@@ -96,7 +100,7 @@ More install paths: [Install Guide](docs/install.md).
96
100
 
97
101
  ## Platform Support
98
102
 
99
- 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.13. 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.
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
104
 
101
105
  ## Dashboard Preview
102
106
 
@@ -193,7 +197,7 @@ codex-usage-tracker summary --preset last-7-days
193
197
  codex-usage-tracker query --since 2026-06-01 --min-credits 1
194
198
  codex-usage-tracker session <session-id>
195
199
  codex-usage-tracker export --output usage.csv
196
- codex-usage-tracker dashboard --open
200
+ codex-usage-tracker open-dashboard
197
201
  codex-usage-tracker support-bundle --output ~/.codex-usage-tracker/support-bundle.json
198
202
  ```
199
203
 
@@ -205,7 +209,7 @@ The tracker stores aggregate metrics only: session ids, timestamps, local source
205
209
 
206
210
  It does **not** store prompts, assistant messages, tool output, pasted secrets, raw transcript snippets, or raw context in SQLite, CSV exports, generated dashboard HTML, or synthetic screenshots.
207
211
 
208
- On-demand context loading reads a single original local JSONL file only after an explicit row action, redacts common secret patterns, caps returned text size, and can be disabled with:
212
+ On-demand context loading reads a single original local JSONL file only after an explicit row action, redacts common secret patterns, caps returned text size, and can start off until you enable it from the details panel:
209
213
 
210
214
  ```bash
211
215
  codex-usage-tracker serve-dashboard --no-context-api --open
@@ -257,6 +261,7 @@ This is optional. The normal shell install above is the fastest trusted path for
257
261
 
258
262
  ## Roadmap
259
263
 
264
+ - Keep Python runtime support validated with CI matrix coverage, package classifiers, release docs, and installed-package smoke tests.
260
265
  - Improve the `Set limits` flow with a paste/import experience for 5-hour and weekly allowance snapshots.
261
266
  - Track allowance snapshot history so local Codex credits can be compared against visible remaining-usage changes over time.
262
267
  - Clarify top-card token accounting by showing output tokens and reasoning output as a subset instead of implying all token cards add together.
@@ -9,7 +9,7 @@ Local-first dashboard, Codex plugin, and companion skill for understanding where
9
9
 
10
10
  [![CI](https://github.com/douglasmonsky/codex-usage-tracker/actions/workflows/ci.yml/badge.svg)](https://github.com/douglasmonsky/codex-usage-tracker/actions/workflows/ci.yml)
11
11
  [![PyPI](https://img.shields.io/pypi/v/codex-usage-tracking.svg)](https://pypi.org/project/codex-usage-tracking/)
12
- ![Python 3.10-3.13](https://img.shields.io/badge/python-3.10--3.13-blue)
12
+ ![Python 3.10-3.14](https://img.shields.io/badge/python-3.10--3.14-blue)
13
13
  [![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
14
14
 
15
15
  > **Unofficial project:** Codex Usage Tracker is an independent open-source project. It is not made by, affiliated with, endorsed by, sponsored by, or supported by OpenAI. OpenAI and Codex are trademarks of OpenAI; this project only reads local log files from your machine.
@@ -31,6 +31,9 @@ codex-usage-tracker serve-dashboard --open
31
31
  ```
32
32
 
33
33
  Use your normal Python launcher for your platform: `python3` is common on macOS/Linux, and `py` may be preferable on Windows. On macOS with Homebrew, `brew install pipx` is also fine.
34
+ If `codex-usage-tracker` is not found after installing with pipx, open a new terminal or add the binary directory printed by `pipx ensurepath` to your `PATH`.
35
+
36
+ `serve-dashboard` refreshes active-session usage before opening by default. Use `--no-refresh` only when you intentionally want to inspect the cached local index.
34
37
 
35
38
  Package naming: the PyPI distribution is `codex-usage-tracking`; the installed command is `codex-usage-tracker`; the GitHub repository remains `douglasmonsky/codex-usage-tracker`. The `codex-usage-tracker` PyPI name is not this project, so avoid similarly named packages when following these docs.
36
39
 
@@ -60,7 +63,7 @@ More install paths: [Install Guide](docs/install.md).
60
63
 
61
64
  ## Platform Support
62
65
 
63
- 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.13. 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.
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.
64
67
 
65
68
  ## Dashboard Preview
66
69
 
@@ -157,7 +160,7 @@ codex-usage-tracker summary --preset last-7-days
157
160
  codex-usage-tracker query --since 2026-06-01 --min-credits 1
158
161
  codex-usage-tracker session <session-id>
159
162
  codex-usage-tracker export --output usage.csv
160
- codex-usage-tracker dashboard --open
163
+ codex-usage-tracker open-dashboard
161
164
  codex-usage-tracker support-bundle --output ~/.codex-usage-tracker/support-bundle.json
162
165
  ```
163
166
 
@@ -169,7 +172,7 @@ The tracker stores aggregate metrics only: session ids, timestamps, local source
169
172
 
170
173
  It does **not** store prompts, assistant messages, tool output, pasted secrets, raw transcript snippets, or raw context in SQLite, CSV exports, generated dashboard HTML, or synthetic screenshots.
171
174
 
172
- On-demand context loading reads a single original local JSONL file only after an explicit row action, redacts common secret patterns, caps returned text size, and can be disabled with:
175
+ On-demand context loading reads a single original local JSONL file only after an explicit row action, redacts common secret patterns, caps returned text size, and can start off until you enable it from the details panel:
173
176
 
174
177
  ```bash
175
178
  codex-usage-tracker serve-dashboard --no-context-api --open
@@ -221,6 +224,7 @@ This is optional. The normal shell install above is the fastest trusted path for
221
224
 
222
225
  ## Roadmap
223
226
 
227
+ - Keep Python runtime support validated with CI matrix coverage, package classifiers, release docs, and installed-package smoke tests.
224
228
  - Improve the `Set limits` flow with a paste/import experience for 5-hour and weekly allowance snapshots.
225
229
  - Track allowance snapshot history so local Codex credits can be compared against visible remaining-usage changes over time.
226
230
  - Clarify top-card token accounting by showing output tokens and reasoning output as a subset instead of implying all token cards add together.
@@ -22,7 +22,7 @@ The MCP `usage_call_context` tool is disabled unless the MCP server process expl
22
22
 
23
23
  ## Localhost Dashboard Token
24
24
 
25
- `serve-dashboard` creates a random per-server API token and embeds it in the generated dashboard HTML for that local server session. The token is used for localhost `/api/usage` refreshes and `/api/context` requests. Treat generated active dashboard files and URLs as local-only artifacts; do not publish them or send them to someone else.
25
+ `serve-dashboard` creates a random per-server API token and embeds it in the generated dashboard HTML for that local server session. The token is used for localhost `/api/usage` refreshes, `/api/context` requests, and runtime context-loading settings. Treat generated active dashboard files and URLs as local-only artifacts; do not publish them or send them to someone else.
26
26
 
27
27
  The dashboard server rejects non-loopback hosts and cross-origin requests. This is a local hardening measure, not a reason to expose the server on a network interface.
28
28
 
@@ -15,7 +15,7 @@ Codex Usage Tracker is a local sidecar app. It reads aggregate token counters fr
15
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
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.
17
17
  - `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 for 10k, 100k, and 500k aggregate-row fixtures. It must stay synthetic-only and must not read real Codex logs.
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
19
  - `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
20
  - `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
21
  - `src/codex_usage_tracker/plugin_data/skills/` contains the wheel-bundled copies installed by `codex-usage-tracker install-plugin`.
@@ -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 500000` after changing SQLite filters, dashboard payload loading, or indexes.
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.
@@ -1,6 +1,6 @@
1
- # CLI and MCP JSON Schemas
1
+ # CLI, MCP, and Dashboard JSON Schemas
2
2
 
3
- Codex Usage Tracker exposes aggregate-only JSON for automation through CLI `--json` flags and MCP tools. These payloads do not include prompts, assistant messages, tool output, or raw transcript snippets.
3
+ Codex Usage Tracker exposes aggregate-only JSON for automation through CLI `--json` flags, MCP tools, and the local dashboard server API. These payloads do not include prompts, assistant messages, tool output, or raw transcript snippets.
4
4
 
5
5
  ## Companion Skill Usage
6
6
 
@@ -24,6 +24,13 @@ Use the global `--privacy-mode redacted` or `--privacy-mode strict` option, or t
24
24
 
25
25
  Stable payload contracts are tracked in `codex_usage_tracker.json_contracts` and covered by tests. Every stable payload includes a top-level `schema` string so agents can distinguish compatible responses from markdown, disabled-context responses, or future versions.
26
26
 
27
+ Compatibility rules before 1.0:
28
+
29
+ - Additive fields are allowed when they do not change documented field types or privacy semantics.
30
+ - Removing a documented schema, removing a required field, changing a required field type, or changing privacy behavior requires either a new schema id or an explicit pre-1.0 migration note.
31
+ - After 1.0, breaking payload changes require a new schema id.
32
+ - Config-file schemas such as pricing, allowance, and rate-card JSON are tracked separately from runtime CLI/MCP/dashboard payload schemas.
33
+
27
34
  Tracked schema ids:
28
35
 
29
36
  | Schema | Surface |
@@ -42,6 +49,7 @@ Tracked schema ids:
42
49
  | `codex-usage-tracker-session-v1` | CLI `session --json`, MCP `session_usage(response_format="json")` |
43
50
  | `codex-usage-tracker-context-v1` | CLI `context`, MCP `usage_call_context` when raw context is explicitly enabled |
44
51
  | `codex-usage-tracker-context-disabled-v1` | MCP `usage_call_context` when raw context is disabled |
52
+ | `codex-usage-tracker-context-settings-v1` | Dashboard server `/api/context-settings` response |
45
53
  | `codex-usage-tracker-dashboard-v1` | CLI `dashboard --json`, MCP `generate_usage_dashboard()` |
46
54
  | `codex-usage-tracker-open-dashboard-v1` | CLI `open-dashboard --json` |
47
55
  | `codex-usage-tracker-serve-dashboard-v1` | CLI `serve-dashboard --json` startup payload |
@@ -33,11 +33,15 @@ codex-usage-tracker inspect-log ~/.codex/sessions/YYYY/MM/DD/rollout-...jsonl --
33
33
  codex-usage-tracker dashboard --open
34
34
  codex-usage-tracker dashboard --include-archived --open
35
35
  codex-usage-tracker open-dashboard
36
+ codex-usage-tracker open-dashboard --no-refresh
36
37
  codex-usage-tracker serve-dashboard --open
38
+ codex-usage-tracker serve-dashboard --no-refresh --open
37
39
  codex-usage-tracker serve-dashboard --no-context-api --open
38
40
  ```
39
41
 
40
- `serve-dashboard --context-api explicit` is the default and keeps context loading as an explicit per-row action. `serve-dashboard --no-context-api` or `--context-api disabled` serves live aggregate refresh while disabling `/api/context` entirely.
42
+ `serve-dashboard --context-api explicit` is the default and keeps context loading as an explicit per-row action. `serve-dashboard --no-context-api` or `--context-api disabled` starts with context loading off; a token-protected button in the local details panel can enable it without restarting the server.
43
+
44
+ `open-dashboard` and `serve-dashboard` refresh active-session logs before opening by default. Use `--no-refresh` only for an intentionally cached snapshot. The lower-level `dashboard` command writes from the current SQLite index and does not rescan logs.
41
45
 
42
46
  Dashboards default to active sessions only. Use `--include-archived` for an all-history static/opened dashboard, or switch the served dashboard's `History` control from `Active sessions only` to `All history` when you intentionally want archived logs scanned and included.
43
47
 
@@ -35,6 +35,8 @@ codex-usage-tracker --privacy-mode strict dashboard --open
35
35
 
36
36
  Redacted mode hides raw cwd/source paths, hides Git remote labels, and hashes unnamed projects while preserving configured aliases. Strict mode also hides project-relative cwd, Git branch, and tags. The dashboard header shows the active metadata mode.
37
37
 
38
+ `serve-dashboard` refreshes active-session logs before opening by default. Use `--no-refresh` only when you intentionally want a cached view of the existing local index.
39
+
38
40
  The server keeps the HTML aggregate-only and enables two live features:
39
41
 
40
42
  - `Refresh` rescans local Codex logs and updates the dashboard rows.
@@ -43,12 +45,12 @@ The server keeps the HTML aggregate-only and enables two live features:
43
45
  For a static snapshot, use:
44
46
 
45
47
  ```bash
46
- codex-usage-tracker dashboard --open
48
+ codex-usage-tracker open-dashboard
47
49
  ```
48
50
 
49
- Static file mode can still filter, sort, and inspect aggregate call fields. It cannot refresh from logs or load raw context until you open the dashboard through `serve-dashboard`.
51
+ Static file mode can still filter, sort, and inspect aggregate call fields. `open-dashboard` refreshes before writing the snapshot unless you pass `--no-refresh`. Static files cannot refresh from logs or load raw context after opening; use `serve-dashboard` when you want those live controls.
50
52
 
51
- The localhost server uses a random per-server token for refresh and context API calls, validates loopback `Host` and `Origin` headers, and can run as aggregate-only with `codex-usage-tracker serve-dashboard --no-context-api`.
53
+ The localhost server uses a random per-server token for refresh and context API calls, validates loopback `Host` and `Origin` headers, and can start with context loading off through `codex-usage-tracker serve-dashboard --no-context-api`.
52
54
 
53
55
  ## Insights View
54
56
 
@@ -141,12 +143,12 @@ When served from localhost, the details panel includes `Load context` and `Inclu
141
143
  - `Load context` fetches a size-limited, redacted context excerpt for only that call.
142
144
  - `Include tool output` repeats the request with tool output included, still redacted and capped.
143
145
  - Raw context is not written to SQLite, CSV, or the generated dashboard HTML.
144
- - If the server was started with `--no-context-api`, the context buttons stay disabled and the dashboard remains aggregate-only.
146
+ - If the server was started with `--no-context-api`, context loading starts off. Use `Enable context loading` in the details panel when you want to allow explicit row actions without restarting the dashboard server.
145
147
 
146
148
  ## Practical Workflow
147
149
 
148
150
  1. Start with `serve-dashboard --open`.
149
- 2. Use `Refresh` after a Codex run finishes, or leave `Live` enabled while you work.
151
+ 2. Leave `Live` enabled while you work, or click `Refresh` after a Codex run finishes.
150
152
  3. Leave `History` on `Active sessions only` for current work. Switch to `All history` when you intentionally want archived sessions included in the live refresh.
151
153
  4. Optionally run `parse-allowance` with copied values from Codex Usage or `/status`, or initialize and edit `allowance.json` manually.
152
154
  5. Start in `Insights` view and review the highest-severity attention cards.