codex-usage-tracking 0.3.2__tar.gz → 0.4.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/.codex-plugin/plugin.json +1 -1
  2. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/AGENTS.md +146 -1
  3. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/CHANGELOG.md +17 -0
  4. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/PKG-INFO +11 -5
  5. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/README.md +9 -4
  6. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/docs/architecture.md +2 -2
  7. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/docs/cli-json-schemas.md +10 -2
  8. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/docs/cli-reference.md +56 -0
  9. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/docs/dashboard-guide.md +2 -2
  10. codex_usage_tracking-0.4.1/docs/development.md +358 -0
  11. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/docs/install.md +9 -3
  12. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/docs/mcp.md +3 -3
  13. codex_usage_tracking-0.4.1/docs/one-dot-oh-readiness.md +226 -0
  14. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/docs/pricing-and-credits.md +4 -1
  15. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/docs/privacy.md +19 -4
  16. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/pyproject.toml +2 -1
  17. codex_usage_tracking-0.4.1/scripts/benchmark_synthetic_history.py +431 -0
  18. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/scripts/check_release.py +148 -5
  19. codex_usage_tracking-0.4.1/scripts/smoke_installed_package.py +328 -0
  20. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/skills/codex-usage-tracker/scripts/run_mcp.py +2 -2
  21. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/src/codex_usage_tracker/__init__.py +1 -1
  22. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/src/codex_usage_tracker/context.py +2 -44
  23. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/src/codex_usage_tracker/diagnostics.py +19 -3
  24. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/src/codex_usage_tracker/json_contracts.py +6 -0
  25. codex_usage_tracking-0.4.1/src/codex_usage_tracker/redaction.py +53 -0
  26. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/src/codex_usage_tracker/store.py +21 -0
  27. codex_usage_tracking-0.4.1/src/codex_usage_tracker/support.py +283 -0
  28. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/src/codex_usage_tracking.egg-info/PKG-INFO +11 -5
  29. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/src/codex_usage_tracking.egg-info/SOURCES.txt +7 -0
  30. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/tests/test_cli_lifecycle.py +40 -1
  31. codex_usage_tracking-0.4.1/tests/test_cli_release.py +392 -0
  32. codex_usage_tracking-0.4.1/tests/test_dashboard_state.py +92 -0
  33. codex_usage_tracking-0.4.1/tests/test_json_contracts.py +156 -0
  34. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/tests/test_plugin_installer.py +2 -1
  35. codex_usage_tracking-0.4.1/tests/test_privacy.py +425 -0
  36. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/tests/test_store_dashboard_mcp.py +3 -0
  37. codex_usage_tracking-0.4.1/tests/test_store_migrations.py +282 -0
  38. codex_usage_tracking-0.4.1/tests/test_support.py +252 -0
  39. codex_usage_tracking-0.3.2/docs/development.md +0 -141
  40. codex_usage_tracking-0.3.2/scripts/benchmark_synthetic_history.py +0 -187
  41. codex_usage_tracking-0.3.2/src/codex_usage_tracker/support.py +0 -147
  42. codex_usage_tracking-0.3.2/tests/test_cli_release.py +0 -162
  43. codex_usage_tracking-0.3.2/tests/test_json_contracts.py +0 -50
  44. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/.mcp.json +0 -0
  45. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/CONTRIBUTING.md +0 -0
  46. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/LICENSE +0 -0
  47. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/MANIFEST.in +0 -0
  48. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/SECURITY.md +0 -0
  49. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/assets/icon.svg +0 -0
  50. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/docs/assets/dashboard-calls-preview.png +0 -0
  51. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/docs/assets/dashboard-calls.png +0 -0
  52. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/docs/assets/dashboard-details.png +0 -0
  53. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/docs/assets/dashboard-insights.png +0 -0
  54. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/docs/assets/dashboard-threads.png +0 -0
  55. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/docs/assets/plugin-prompts.png +0 -0
  56. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/docs/assets/plugin-thread-leaderboard.png +0 -0
  57. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/docs/assets/ux/call-detail-panel.png +0 -0
  58. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/docs/assets/ux/insight-overview.png +0 -0
  59. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/docs/assets/ux/thread-investigation.png +0 -0
  60. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/docs/ui-ux-improvement-plan.md +0 -0
  61. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/scripts/install_local_plugin.py +0 -0
  62. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/setup.cfg +0 -0
  63. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/skills/codex-usage-api/SKILL.md +0 -0
  64. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/skills/codex-usage-tracker/SKILL.md +0 -0
  65. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/src/codex_usage_tracker/__main__.py +0 -0
  66. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/src/codex_usage_tracker/allowance.py +0 -0
  67. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/src/codex_usage_tracker/api_payloads.py +0 -0
  68. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/src/codex_usage_tracker/cli.py +0 -0
  69. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/src/codex_usage_tracker/costing.py +0 -0
  70. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/src/codex_usage_tracker/dashboard.py +0 -0
  71. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/src/codex_usage_tracker/formatting.py +0 -0
  72. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/src/codex_usage_tracker/mcp_server.py +0 -0
  73. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/src/codex_usage_tracker/models.py +0 -0
  74. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/src/codex_usage_tracker/parser.py +0 -0
  75. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/src/codex_usage_tracker/paths.py +0 -0
  76. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/src/codex_usage_tracker/plugin_data/__init__.py +0 -0
  77. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/src/codex_usage_tracker/plugin_data/assets/icon.svg +0 -0
  78. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/src/codex_usage_tracker/plugin_data/dashboard/dashboard.css +0 -0
  79. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/src/codex_usage_tracker/plugin_data/dashboard/dashboard.js +0 -0
  80. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/src/codex_usage_tracker/plugin_data/dashboard/dashboard_data.js +0 -0
  81. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/src/codex_usage_tracker/plugin_data/dashboard/dashboard_format.js +0 -0
  82. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/src/codex_usage_tracker/plugin_data/dashboard/dashboard_state.js +0 -0
  83. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/src/codex_usage_tracker/plugin_data/dashboard/dashboard_template.html +0 -0
  84. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/src/codex_usage_tracker/plugin_data/docs/assets/dashboard-calls.png +0 -0
  85. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/src/codex_usage_tracker/plugin_data/docs/assets/dashboard-details.png +0 -0
  86. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/src/codex_usage_tracker/plugin_data/docs/assets/dashboard-insights.png +0 -0
  87. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/src/codex_usage_tracker/plugin_data/docs/assets/dashboard-threads.png +0 -0
  88. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/src/codex_usage_tracker/plugin_data/docs/dashboard-guide.html +0 -0
  89. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/src/codex_usage_tracker/plugin_data/rate_cards/codex-credit-rates.json +0 -0
  90. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/src/codex_usage_tracker/plugin_data/skills/codex-usage-api/SKILL.md +0 -0
  91. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/src/codex_usage_tracker/plugin_data/skills/codex-usage-tracker/SKILL.md +0 -0
  92. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/src/codex_usage_tracker/plugin_installer.py +0 -0
  93. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/src/codex_usage_tracker/pricing.py +0 -0
  94. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/src/codex_usage_tracker/pricing_config.py +0 -0
  95. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/src/codex_usage_tracker/pricing_estimates.py +0 -0
  96. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/src/codex_usage_tracker/pricing_openai.py +0 -0
  97. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/src/codex_usage_tracker/projects.py +0 -0
  98. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/src/codex_usage_tracker/recommendations.py +0 -0
  99. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/src/codex_usage_tracker/reports.py +0 -0
  100. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/src/codex_usage_tracker/schema.py +0 -0
  101. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/src/codex_usage_tracker/server.py +0 -0
  102. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/src/codex_usage_tracker/threads.py +0 -0
  103. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/src/codex_usage_tracking.egg-info/dependency_links.txt +0 -0
  104. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/src/codex_usage_tracking.egg-info/entry_points.txt +0 -0
  105. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/src/codex_usage_tracking.egg-info/requires.txt +0 -0
  106. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/src/codex_usage_tracking.egg-info/top_level.txt +0 -0
  107. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/tests/test_allowance.py +0 -0
  108. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/tests/test_mcp_launcher.py +0 -0
  109. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/tests/test_parser.py +0 -0
  110. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/tests/test_pricing.py +0 -0
  111. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/tests/test_projects.py +0 -0
  112. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/tests/test_recommendations.py +0 -0
  113. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/tests/test_schema.py +0 -0
  114. {codex_usage_tracking-0.3.2 → codex_usage_tracking-0.4.1}/tests/test_threads.py +0 -0
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codex-usage-tracker",
3
- "version": "0.3.2",
3
+ "version": "0.4.1",
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,23 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.4.1 - 2026-06-09
6
+
7
+ - Harden the production PyPI workflow so manual publishing must run from `main` or a tag ref before artifacts are downloaded and uploaded.
8
+ - Strengthen `scripts/check_release.py` so it validates the publish-ref preflight inside both the TestPyPI and PyPI jobs.
9
+ - Check off completed 1.0 readiness items with evidence for migration coverage, localhost dashboard smoke testing, and the protected GitHub `pypi` environment.
10
+ - Pin the marketplace MCP runtime launcher to the exact `codex-usage-tracking==0.4.1` package.
11
+
12
+ ## 0.4.0 - 2026-06-09
13
+
14
+ - Add official Python 3.14 support across CI, package classifiers, README/install docs, and installed-package Docker smoke coverage.
15
+ - Add a release recovery runbook for failed publish workflows, stale PyPI/TestPyPI pages, Trusted Publishing issues, bad artifacts, and patch-forward recovery.
16
+ - Add synthetic large-history benchmark thresholds for active/all-history dashboard queries, date filtering, model/effort filtering, recommendations, pricing coverage, and project summaries.
17
+ - Add stricter privacy regression coverage for generated dashboards, CSV exports, API payloads, and support bundles.
18
+ - Redact sensitive strings and local diagnostic paths in support bundles, including nested doctor output in redacted and strict privacy modes.
19
+ - Add aggregate schema migration, JSON contract parity, installed-package smoke, and protected-main workflow readiness coverage.
20
+ - Pin the marketplace MCP runtime launcher to the exact `codex-usage-tracking==0.4.0` package.
21
+
5
22
  ## 0.3.2 - 2026-06-08
6
23
 
7
24
  - Make `open-dashboard` and `serve-dashboard` refresh active-session logs by default, with `--no-refresh` as the explicit cached-index mode.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codex-usage-tracking
3
- Version: 0.3.2
3
+ Version: 0.4.1
4
4
  Summary: Unofficial local Codex plugin and dashboard for investigating aggregate token usage, costs, caching, and thread patterns.
5
5
  Author: Douglas Monsky
6
6
  License-Expression: MIT
@@ -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,7 @@ 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`.
70
72
 
71
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.
72
74
 
@@ -98,7 +100,7 @@ More install paths: [Install Guide](docs/install.md).
98
100
 
99
101
  ## Platform Support
100
102
 
101
- 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.
102
104
 
103
105
  ## Dashboard Preview
104
106
 
@@ -251,14 +253,18 @@ This is optional. The normal shell install above is the fastest trusted path for
251
253
  ## Current Limitations
252
254
 
253
255
  - This is a sidecar dashboard and plugin, not a native Codex chat overlay.
256
+ - Codex upstream log formats can change, and parser compatibility may require tracker updates.
254
257
  - Token counts come from Codex's logged counters; the tracker does not re-tokenize prompts.
255
- - Pricing and Codex credit estimates depend on local rate data and confidence labels.
256
- - Remaining 5-hour and weekly allowance is not read automatically from the logged-in account.
258
+ - Pricing and rate-card sources can change outside this project.
259
+ - Pricing and Codex credit estimates depend on local rate data and confidence labels and are not guaranteed to match exact billing.
260
+ - Live account allowance cannot be read automatically by this local tracker; remaining 5-hour and weekly allowance is only available when you configure copied values.
257
261
  - Local Codex logs may not include usage from other ChatGPT agentic surfaces that share the same allowance.
262
+ - Plugin discovery limitations are separate from core Python CLI/dashboard support.
258
263
  - Parent-child thread relationships are only as good as the metadata Codex logs; inferred auto-review attachments are labeled as inferred.
259
264
 
260
265
  ## Roadmap
261
266
 
267
+ - Keep Python runtime support validated with CI matrix coverage, package classifiers, release docs, and installed-package smoke tests.
262
268
  - Improve the `Set limits` flow with a paste/import experience for 5-hour and weekly allowance snapshots.
263
269
  - Track allowance snapshot history so local Codex credits can be compared against visible remaining-usage changes over time.
264
270
  - 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,7 @@ 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`.
34
35
 
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.
36
37
 
@@ -62,7 +63,7 @@ More install paths: [Install Guide](docs/install.md).
62
63
 
63
64
  ## Platform Support
64
65
 
65
- 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.
66
67
 
67
68
  ## Dashboard Preview
68
69
 
@@ -215,14 +216,18 @@ This is optional. The normal shell install above is the fastest trusted path for
215
216
  ## Current Limitations
216
217
 
217
218
  - This is a sidecar dashboard and plugin, not a native Codex chat overlay.
219
+ - Codex upstream log formats can change, and parser compatibility may require tracker updates.
218
220
  - Token counts come from Codex's logged counters; the tracker does not re-tokenize prompts.
219
- - Pricing and Codex credit estimates depend on local rate data and confidence labels.
220
- - Remaining 5-hour and weekly allowance is not read automatically from the logged-in account.
221
+ - Pricing and rate-card sources can change outside this project.
222
+ - Pricing and Codex credit estimates depend on local rate data and confidence labels and are not guaranteed to match exact billing.
223
+ - Live account allowance cannot be read automatically by this local tracker; remaining 5-hour and weekly allowance is only available when you configure copied values.
221
224
  - Local Codex logs may not include usage from other ChatGPT agentic surfaces that share the same allowance.
225
+ - Plugin discovery limitations are separate from core Python CLI/dashboard support.
222
226
  - Parent-child thread relationships are only as good as the metadata Codex logs; inferred auto-review attachments are labeled as inferred.
223
227
 
224
228
  ## Roadmap
225
229
 
230
+ - Keep Python runtime support validated with CI matrix coverage, package classifiers, release docs, and installed-package smoke tests.
226
231
  - Improve the `Set limits` flow with a paste/import experience for 5-hour and weekly allowance snapshots.
227
232
  - Track allowance snapshot history so local Codex credits can be compared against visible remaining-usage changes over time.
228
233
  - Clarify top-card token accounting by showing output tokens and reasoning output as a subset instead of implying all token cards add together.
@@ -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 |
@@ -4,6 +4,14 @@ This page lists the common command-line workflows. For tested JSON contract ids,
4
4
 
5
5
  ## Index And Setup
6
6
 
7
+ Run first-time setup:
8
+
9
+ ```bash
10
+ codex-usage-tracker setup
11
+ ```
12
+
13
+ `setup` installs or refreshes the local plugin wrapper, initializes local config templates when needed, refreshes the aggregate index, runs `doctor`, and prints whether Codex needs a restart for plugin discovery.
14
+
7
15
  Refresh the local aggregate index:
8
16
 
9
17
  ```bash
@@ -27,6 +35,36 @@ codex-usage-tracker inspect-log ~/.codex/sessions/YYYY/MM/DD/rollout-...jsonl --
27
35
 
28
36
  `inspect-log` reports parser adapter, aggregate token-count events, session ids, models, and parser diagnostics. It does not store raw prompts, assistant messages, tool output, or transcript snippets.
29
37
 
38
+ Check setup without writing files:
39
+
40
+ ```bash
41
+ codex-usage-tracker doctor
42
+ codex-usage-tracker doctor --suggest-repair
43
+ ```
44
+
45
+ `doctor` validates local paths, database state, parser diagnostics, pricing and allowance config, dashboard output, plugin files, and MCP importability. `--suggest-repair` adds likely next commands without making changes.
46
+
47
+ Reset only the local aggregate database:
48
+
49
+ ```bash
50
+ codex-usage-tracker reset-db --yes
51
+ ```
52
+
53
+ `reset-db` deletes tracker-owned aggregate SQLite rows. It does not delete raw Codex logs and requires `--yes`.
54
+
55
+ ## Plugin Lifecycle
56
+
57
+ ```bash
58
+ codex-usage-tracker install-plugin
59
+ codex-usage-tracker install-plugin --python .venv/bin/python
60
+ codex-usage-tracker upgrade-plugin
61
+ codex-usage-tracker uninstall-plugin
62
+ ```
63
+
64
+ `install-plugin` writes the package-owned local Codex plugin wrapper, companion skills, and MCP config. Use the `--python` form for source checkouts that should use a repo-local virtual environment.
65
+
66
+ `upgrade-plugin` refreshes an existing wrapper in place. `uninstall-plugin` removes only the tracker-owned plugin wrapper and marketplace entry.
67
+
30
68
  ## Dashboard
31
69
 
32
70
  ```bash
@@ -110,6 +148,14 @@ codex-usage-tracker export --output usage.csv --limit 0
110
148
 
111
149
  Use `--privacy-mode redacted` or `--privacy-mode strict` before sharing CSV output.
112
150
 
151
+ ## Support Bundle
152
+
153
+ ```bash
154
+ codex-usage-tracker --privacy-mode strict support-bundle --output ~/.codex-usage-tracker/support-bundle.json
155
+ ```
156
+
157
+ Support bundles are diagnostic summaries for issues. They include package, platform, doctor, schema, parser, pricing, allowance, threshold, project-config, and privacy metadata. They exclude raw logs, aggregate rows, prompts, assistant messages, tool output, and context text.
158
+
113
159
  ## Local Config
114
160
 
115
161
  ```bash
@@ -125,6 +171,16 @@ codex-usage-tracker init-projects
125
171
 
126
172
  Local config files live under `~/.codex-usage-tracker/` and are never committed by this project.
127
173
 
174
+ Stable local config files:
175
+
176
+ - `pricing.json`: schema `_schema: codex-usage-tracker-pricing-v1`, optional `_source`, `models`, `aliases`, and `_estimated_models`. `models` maps model labels to USD-per-million-token rates such as `input`, `cached_input`, and `output`.
177
+ - `rate-card.json`: schema `codex-usage-tracker-codex-rate-card-v1`, optional `_source`, `credit_rates`, and `aliases`. `credit_rates` maps Codex model labels to credit rates for aggregate token counters.
178
+ - `allowance.json`: schema `codex-usage-tracker-allowance-v1`, `windows`, optional `credit_rates`, and `aliases`. `windows` stores copied 5-hour, weekly, or other allowance snapshots such as `remaining_percent`, `reset_at`, `remaining_credits`, and `total_credits`.
179
+ - `thresholds.json`: JSON object keyed by recommendation threshold names such as `low_cache_ratio`, `high_context_percent`, and `high_cost_usd`. Unknown keys are ignored.
180
+ - `projects.json`: JSON object with `aliases`, `ignored_paths`, and `tags` for local project attribution.
181
+
182
+ These config schemas are part of the 1.0 compatibility surface. New optional fields may be added, but existing meanings should not change without documentation and a compatibility plan.
183
+
128
184
  ## Privacy Mode
129
185
 
130
186
  `--privacy-mode` is a global option, so place it before the subcommand:
@@ -22,9 +22,9 @@ codex-usage-tracker init-allowance
22
22
  codex-usage-tracker parse-allowance "5h 79% 6:50 PM Weekly 33% Jun 7"
23
23
  ```
24
24
 
25
- To tune review thresholds locally, run `codex-usage-tracker init-thresholds` and edit `~/.codex-usage-tracker/thresholds.json`. These thresholds control low-cache, high-context, high-uncached-input, large-thread, reasoning-spike, low-output, and high-cost recommendations.
25
+ To tune review thresholds locally, run `codex-usage-tracker init-thresholds` and edit `~/.codex-usage-tracker/thresholds.json`. This file is a JSON object keyed by recommendation threshold names such as `low_cache_ratio`, `high_context_percent`, and `high_cost_usd`; unknown keys are ignored. These thresholds control low-cache, high-context, high-uncached-input, large-thread, reasoning-spike, low-output, and high-cost recommendations.
26
26
 
27
- To tune project attribution locally, run `codex-usage-tracker init-projects` and edit `~/.codex-usage-tracker/projects.json`. The dashboard derives project name, relative cwd, branch, tags, and a hashed remote origin from aggregate `cwd` and local Git metadata when available.
27
+ To tune project attribution locally, run `codex-usage-tracker init-projects` and edit `~/.codex-usage-tracker/projects.json`. This file supports `aliases`, `ignored_paths`, and `tags`. The dashboard derives project name, relative cwd, branch, tags, and a hashed remote origin from aggregate `cwd` and local Git metadata when available.
28
28
 
29
29
  Before sharing screenshots or generated artifacts, use `--privacy-mode redacted` or `--privacy-mode strict` before the subcommand:
30
30