codex-agent-hour-tracker 0.1.2__tar.gz → 0.2.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 (45) hide show
  1. {codex_agent_hour_tracker-0.1.2 → codex_agent_hour_tracker-0.2.0}/.gitignore +1 -0
  2. codex_agent_hour_tracker-0.2.0/CHANGELOG.md +24 -0
  3. codex_agent_hour_tracker-0.2.0/PKG-INFO +147 -0
  4. codex_agent_hour_tracker-0.2.0/README.md +121 -0
  5. {codex_agent_hour_tracker-0.1.2 → codex_agent_hour_tracker-0.2.0}/SECURITY.md +11 -1
  6. codex_agent_hour_tracker-0.2.0/docs/exports.md +36 -0
  7. {codex_agent_hour_tracker-0.1.2 → codex_agent_hour_tracker-0.2.0}/docs/methodology.md +28 -6
  8. {codex_agent_hour_tracker-0.1.2 → codex_agent_hour_tracker-0.2.0}/pyproject.toml +6 -1
  9. codex_agent_hour_tracker-0.2.0/scripts/sync_benchmarks.py +35 -0
  10. codex_agent_hour_tracker-0.2.0/site/_headers +6 -0
  11. codex_agent_hour_tracker-0.2.0/site/app.js +200 -0
  12. codex_agent_hour_tracker-0.2.0/site/benchmarks/index.html +92 -0
  13. codex_agent_hour_tracker-0.2.0/site/benchmarks-data.js +28 -0
  14. codex_agent_hour_tracker-0.2.0/site/benchmarks.js +29 -0
  15. codex_agent_hour_tracker-0.2.0/site/favicon.svg +1 -0
  16. codex_agent_hour_tracker-0.2.0/site/index.html +362 -0
  17. codex_agent_hour_tracker-0.2.0/site/score.mjs +292 -0
  18. codex_agent_hour_tracker-0.2.0/site/social-card.png +0 -0
  19. codex_agent_hour_tracker-0.2.0/site/styles.css +729 -0
  20. codex_agent_hour_tracker-0.2.0/skills/codex-agent-hour-tracker/SKILL.md +43 -0
  21. codex_agent_hour_tracker-0.2.0/skills/codex-agent-hour-tracker/agents/openai.yaml +4 -0
  22. {codex_agent_hour_tracker-0.1.2 → codex_agent_hour_tracker-0.2.0}/src/agent_hour_tracker/__init__.py +1 -1
  23. codex_agent_hour_tracker-0.2.0/src/agent_hour_tracker/archive.py +541 -0
  24. codex_agent_hour_tracker-0.2.0/src/agent_hour_tracker/benchmarks.json +27 -0
  25. codex_agent_hour_tracker-0.2.0/src/agent_hour_tracker/benchmarks.py +15 -0
  26. codex_agent_hour_tracker-0.2.0/src/agent_hour_tracker/cli.py +627 -0
  27. {codex_agent_hour_tracker-0.1.2 → codex_agent_hour_tracker-0.2.0}/src/agent_hour_tracker/metrics.py +143 -1
  28. codex_agent_hour_tracker-0.2.0/src/agent_hour_tracker/report.py +221 -0
  29. {codex_agent_hour_tracker-0.1.2 → codex_agent_hour_tracker-0.2.0}/src/agent_hour_tracker/scanner.py +17 -0
  30. codex_agent_hour_tracker-0.2.0/src/agent_hour_tracker/share.py +368 -0
  31. codex_agent_hour_tracker-0.2.0/tests/site-score.mjs +122 -0
  32. codex_agent_hour_tracker-0.2.0/tests/test_archive.py +258 -0
  33. codex_agent_hour_tracker-0.2.0/tests/test_public_files.py +296 -0
  34. {codex_agent_hour_tracker-0.1.2 → codex_agent_hour_tracker-0.2.0}/tests/test_report.py +1 -1
  35. codex_agent_hour_tracker-0.2.0/tests/test_v020_reports.py +263 -0
  36. codex_agent_hour_tracker-0.1.2/PKG-INFO +0 -127
  37. codex_agent_hour_tracker-0.1.2/README.md +0 -101
  38. codex_agent_hour_tracker-0.1.2/src/agent_hour_tracker/cli.py +0 -287
  39. codex_agent_hour_tracker-0.1.2/src/agent_hour_tracker/report.py +0 -95
  40. codex_agent_hour_tracker-0.1.2/tests/test_public_files.py +0 -801
  41. {codex_agent_hour_tracker-0.1.2 → codex_agent_hour_tracker-0.2.0}/LICENSE +0 -0
  42. {codex_agent_hour_tracker-0.1.2 → codex_agent_hour_tracker-0.2.0}/src/agent_hour_tracker/__main__.py +0 -0
  43. {codex_agent_hour_tracker-0.1.2 → codex_agent_hour_tracker-0.2.0}/tests/test_cli.py +0 -0
  44. {codex_agent_hour_tracker-0.1.2 → codex_agent_hour_tracker-0.2.0}/tests/test_metrics.py +0 -0
  45. {codex_agent_hour_tracker-0.1.2 → codex_agent_hour_tracker-0.2.0}/tests/test_scanner.py +0 -0
@@ -1,4 +1,5 @@
1
1
  /reports/
2
+ *.agent-hours-private.json
2
3
  /dist/
3
4
  /build/
4
5
  /docs/superpowers/
@@ -0,0 +1,24 @@
1
+ # Changelog
2
+
3
+ ## 0.2.0
4
+
5
+ - Rename the public metric to Agent-Hour Score. Keep its exact 30-completed-calendar-day definition.
6
+ - Combine multiple session directories and private exports with global turn deduplication.
7
+ - Add explicit exec inclusion and show measurement scope on reports and cards.
8
+ - Calculate optional Agent Leverage from reported period hours or an estimated weekly schedule.
9
+ - Add monthly summaries with partial-period denominators.
10
+ - Export versioned sanitized score JSON for local browser share-card generation.
11
+ - Redesign agenthours.dev with an interactive parallel-runtime explanation, leverage calculator, share studio, and dated benchmarks.
12
+ - Keep the existing timing methodology and human-root duration statistics.
13
+
14
+ ## 0.1.2
15
+
16
+ - Document compaction compatibility and add regressions for retained timing metadata without conversation decoding.
17
+
18
+ ## 0.1.1
19
+
20
+ - Add human-initiated top-level turn count, mean, and median active duration.
21
+
22
+ ## 0.1.0
23
+
24
+ - Publish the local scanner, calendar-day reports, sanitized scorecard, optional skill, and static website.
@@ -0,0 +1,147 @@
1
+ Metadata-Version: 2.5
2
+ Name: codex-agent-hour-tracker
3
+ Version: 0.2.0
4
+ Summary: Measure cumulative Codex agent runtime without decoding conversation content.
5
+ Project-URL: Homepage, https://agenthours.dev
6
+ Project-URL: Repository, https://github.com/tim-osterhus/codex-agent-hour-tracker
7
+ Project-URL: Issues, https://github.com/tim-osterhus/codex-agent-hour-tracker/issues
8
+ Author-email: Tim Osterhus <tim@millrace.ai>
9
+ License-Expression: MIT
10
+ License-File: LICENSE
11
+ Keywords: agents,analytics,codex,privacy
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Operating System :: OS Independent
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3 :: Only
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Programming Language :: Python :: 3.14
20
+ Classifier: Programming Language :: Python :: Implementation :: CPython
21
+ Classifier: Programming Language :: Python :: Implementation :: PyPy
22
+ Requires-Python: >=3.11
23
+ Requires-Dist: tzdata>=2025.2; platform_system == 'Windows'
24
+ Requires-Dist: tzlocal<6,>=5.3
25
+ Description-Content-Type: text/markdown
26
+
27
+ # Agent Hours
28
+
29
+ Agent Hours is a local CLI that measures cumulative Codex agent-hours from completed turns.
30
+
31
+ See your runtime across profiles and machines, calculate optional Agent Leverage, and make a share card at [agenthours.dev](https://agenthours.dev).
32
+
33
+ ```bash
34
+ uvx codex-agent-hour-tracker --share
35
+ ```
36
+
37
+ Requires [uv](https://docs.astral.sh/uv/getting-started/installation/) and a local Codex session archive. The package supports Python 3.11–3.14 on macOS, Linux, and Windows. Archive-derived runtime is an estimate: missing records and sparse timestamps affect coverage.
38
+
39
+ ## Your Agent-Hour Score
40
+
41
+ The score is mean cumulative runtime across the 30 most recent completed local calendar days ending yesterday. Zero-use days count. Overlapping turns count independently: three agents running for one hour contribute three agent-hours.
42
+
43
+ If today is March 1 in a non-leap year, the window is January 30 through February 28. Custom date ranges produce reports, not canonical scores.
44
+
45
+ The default `interactive-only` scope excludes exec/batch files. It includes delegated turns and non-batch turns with uncertain source metadata. Use `--include-exec` to count exec/batch work as well. Every score states its scope.
46
+
47
+ ## Install once
48
+
49
+ ```bash
50
+ uv tool install codex-agent-hour-tracker
51
+ agent-hours --share
52
+ ```
53
+
54
+ Or use pipx:
55
+
56
+ ```bash
57
+ pipx install codex-agent-hour-tracker
58
+ codex-agent-hour-tracker --share
59
+ ```
60
+
61
+ Both command names invoke the same tool. Upgrade an existing uv installation with `uv tool upgrade codex-agent-hour-tracker`.
62
+
63
+ ## Calculate Agent Leverage
64
+
65
+ Supply your human hours for the entire report period:
66
+
67
+ ```bash
68
+ agent-hours --share --human-hours 160
69
+ ```
70
+
71
+ Or estimate them from a weekly schedule:
72
+
73
+ ```bash
74
+ agent-hours --share --human-hours-per-week 40
75
+ ```
76
+
77
+ Agent Leverage divides agent runtime by human hours over the same period. A weekly estimate uses `weekly hours × calendar days / 7`. The output identifies the assumption. The tool does not measure your human work time or infer it from prompt timestamps.
78
+
79
+ ## Make a share card
80
+
81
+ ```bash
82
+ agent-hours --share --format json
83
+ ```
84
+
85
+ Paste this sanitized aggregate JSON into the [share studio](https://agenthours.dev/#share). Preview and download a square or landscape PNG/SVG in your browser. Calculation and image generation run locally. The website accepts only the public score schema.
86
+
87
+ `--share` is the safe default for sharing, but dates, counts, durations, timezone, and optional human-hours assumptions remain a deliberate aggregate disclosure. Review the card before posting it.
88
+
89
+ ## Profiles and machines
90
+
91
+ Repeat `--sessions-dir` to combine local profile directories:
92
+
93
+ ```bash
94
+ agent-hours --sessions-dir PROFILE_A/sessions --sessions-dir PROFILE_B/sessions --share
95
+ ```
96
+
97
+ For multiple machines, export private timing metadata on each machine:
98
+
99
+ ```bash
100
+ mkdir -p reports
101
+ agent-hours --export reports/laptop.agent-hours-private.json --label laptop
102
+ ```
103
+
104
+ Transfer those private exports using your own secure file-transfer method, then merge them:
105
+
106
+ ```bash
107
+ agent-hours --merge reports/laptop.agent-hours-private.json \
108
+ --merge reports/desktop.agent-hours-private.json --share --include-exec
109
+ ```
110
+
111
+ The merge deduplicates turn identifiers before calculating the combined total. Private exports retain all source classes so you can choose the scope when merging. They contain precise timestamps and hashed turn identifiers. **Do not upload them to the website or commit them.** The tracker does not read account credentials or separate accounts that share a session directory.
112
+
113
+ ## Daily and monthly reports
114
+
115
+ Explicit `--start` and `--end` values define an inclusive local-calendar range:
116
+
117
+ ```bash
118
+ mkdir -p reports
119
+ agent-hours --start 2025-01-01 --end 2025-01-30 --monthly \
120
+ > reports/january-summary.txt
121
+ agent-hours --start 2025-01-01 --end 2025-01-30 --format csv \
122
+ > reports/january-summary.csv
123
+ ```
124
+
125
+ Text reports include daily distribution, monthly summaries when requested, and human-initiated top-level turn count, mean, and median duration. CSV retains one row per calendar date. Partial-month averages use only the days in the requested range. Use `--timezone IANA_ZONE` when combining machines with different local timezones.
126
+
127
+ Full reports and CSVs reveal semi-sensitive activity patterns. Keep generated files in the ignored `reports/` directory and review any output before distribution.
128
+
129
+ ## What the numbers can tell you
130
+
131
+ Agent-hours measure runtime, not useful output, human-equivalent labor, or time saved. Benchmarks are dated contextual references, not a personal ranking. See [benchmarks](https://agenthours.dev/benchmarks/) and the [methodology](docs/methodology.md) for populations, denominators, and timing rules.
132
+
133
+ The scanner retains compact timing metadata without decoding conversation, reasoning, or tool payloads. No session data leaves the machine through the CLI. Compacted records remain supported while completed-turn metadata survives.
134
+
135
+ ## Development
136
+
137
+ ```bash
138
+ uv run python -m unittest discover -s tests -v
139
+ node --test tests/site*.mjs
140
+ python3 scripts/sync_benchmarks.py --check
141
+ ```
142
+
143
+ The repository has a Python package in `src/agent_hour_tracker/`, synthetic tests in `tests/`, and a static website in `site/`. The [export contracts](docs/exports.md) define private merge data and public score data separately. The package benchmark registry generates the website copy through `scripts/sync_benchmarks.py`.
144
+
145
+ The [optional Codex skill](https://github.com/tim-osterhus/codex-agent-hour-tracker/tree/main/skills/codex-agent-hour-tracker/) guides collection and sharing workflows. It is not required to install or run the tool.
146
+
147
+ Read the [changelog](CHANGELOG.md), [security policy](SECURITY.md), and [MIT license](LICENSE).
@@ -0,0 +1,121 @@
1
+ # Agent Hours
2
+
3
+ Agent Hours is a local CLI that measures cumulative Codex agent-hours from completed turns.
4
+
5
+ See your runtime across profiles and machines, calculate optional Agent Leverage, and make a share card at [agenthours.dev](https://agenthours.dev).
6
+
7
+ ```bash
8
+ uvx codex-agent-hour-tracker --share
9
+ ```
10
+
11
+ Requires [uv](https://docs.astral.sh/uv/getting-started/installation/) and a local Codex session archive. The package supports Python 3.11–3.14 on macOS, Linux, and Windows. Archive-derived runtime is an estimate: missing records and sparse timestamps affect coverage.
12
+
13
+ ## Your Agent-Hour Score
14
+
15
+ The score is mean cumulative runtime across the 30 most recent completed local calendar days ending yesterday. Zero-use days count. Overlapping turns count independently: three agents running for one hour contribute three agent-hours.
16
+
17
+ If today is March 1 in a non-leap year, the window is January 30 through February 28. Custom date ranges produce reports, not canonical scores.
18
+
19
+ The default `interactive-only` scope excludes exec/batch files. It includes delegated turns and non-batch turns with uncertain source metadata. Use `--include-exec` to count exec/batch work as well. Every score states its scope.
20
+
21
+ ## Install once
22
+
23
+ ```bash
24
+ uv tool install codex-agent-hour-tracker
25
+ agent-hours --share
26
+ ```
27
+
28
+ Or use pipx:
29
+
30
+ ```bash
31
+ pipx install codex-agent-hour-tracker
32
+ codex-agent-hour-tracker --share
33
+ ```
34
+
35
+ Both command names invoke the same tool. Upgrade an existing uv installation with `uv tool upgrade codex-agent-hour-tracker`.
36
+
37
+ ## Calculate Agent Leverage
38
+
39
+ Supply your human hours for the entire report period:
40
+
41
+ ```bash
42
+ agent-hours --share --human-hours 160
43
+ ```
44
+
45
+ Or estimate them from a weekly schedule:
46
+
47
+ ```bash
48
+ agent-hours --share --human-hours-per-week 40
49
+ ```
50
+
51
+ Agent Leverage divides agent runtime by human hours over the same period. A weekly estimate uses `weekly hours × calendar days / 7`. The output identifies the assumption. The tool does not measure your human work time or infer it from prompt timestamps.
52
+
53
+ ## Make a share card
54
+
55
+ ```bash
56
+ agent-hours --share --format json
57
+ ```
58
+
59
+ Paste this sanitized aggregate JSON into the [share studio](https://agenthours.dev/#share). Preview and download a square or landscape PNG/SVG in your browser. Calculation and image generation run locally. The website accepts only the public score schema.
60
+
61
+ `--share` is the safe default for sharing, but dates, counts, durations, timezone, and optional human-hours assumptions remain a deliberate aggregate disclosure. Review the card before posting it.
62
+
63
+ ## Profiles and machines
64
+
65
+ Repeat `--sessions-dir` to combine local profile directories:
66
+
67
+ ```bash
68
+ agent-hours --sessions-dir PROFILE_A/sessions --sessions-dir PROFILE_B/sessions --share
69
+ ```
70
+
71
+ For multiple machines, export private timing metadata on each machine:
72
+
73
+ ```bash
74
+ mkdir -p reports
75
+ agent-hours --export reports/laptop.agent-hours-private.json --label laptop
76
+ ```
77
+
78
+ Transfer those private exports using your own secure file-transfer method, then merge them:
79
+
80
+ ```bash
81
+ agent-hours --merge reports/laptop.agent-hours-private.json \
82
+ --merge reports/desktop.agent-hours-private.json --share --include-exec
83
+ ```
84
+
85
+ The merge deduplicates turn identifiers before calculating the combined total. Private exports retain all source classes so you can choose the scope when merging. They contain precise timestamps and hashed turn identifiers. **Do not upload them to the website or commit them.** The tracker does not read account credentials or separate accounts that share a session directory.
86
+
87
+ ## Daily and monthly reports
88
+
89
+ Explicit `--start` and `--end` values define an inclusive local-calendar range:
90
+
91
+ ```bash
92
+ mkdir -p reports
93
+ agent-hours --start 2025-01-01 --end 2025-01-30 --monthly \
94
+ > reports/january-summary.txt
95
+ agent-hours --start 2025-01-01 --end 2025-01-30 --format csv \
96
+ > reports/january-summary.csv
97
+ ```
98
+
99
+ Text reports include daily distribution, monthly summaries when requested, and human-initiated top-level turn count, mean, and median duration. CSV retains one row per calendar date. Partial-month averages use only the days in the requested range. Use `--timezone IANA_ZONE` when combining machines with different local timezones.
100
+
101
+ Full reports and CSVs reveal semi-sensitive activity patterns. Keep generated files in the ignored `reports/` directory and review any output before distribution.
102
+
103
+ ## What the numbers can tell you
104
+
105
+ Agent-hours measure runtime, not useful output, human-equivalent labor, or time saved. Benchmarks are dated contextual references, not a personal ranking. See [benchmarks](https://agenthours.dev/benchmarks/) and the [methodology](docs/methodology.md) for populations, denominators, and timing rules.
106
+
107
+ The scanner retains compact timing metadata without decoding conversation, reasoning, or tool payloads. No session data leaves the machine through the CLI. Compacted records remain supported while completed-turn metadata survives.
108
+
109
+ ## Development
110
+
111
+ ```bash
112
+ uv run python -m unittest discover -s tests -v
113
+ node --test tests/site*.mjs
114
+ python3 scripts/sync_benchmarks.py --check
115
+ ```
116
+
117
+ The repository has a Python package in `src/agent_hour_tracker/`, synthetic tests in `tests/`, and a static website in `site/`. The [export contracts](docs/exports.md) define private merge data and public score data separately. The package benchmark registry generates the website copy through `scripts/sync_benchmarks.py`.
118
+
119
+ The [optional Codex skill](https://github.com/tim-osterhus/codex-agent-hour-tracker/tree/main/skills/codex-agent-hour-tracker/) guides collection and sharing workflows. It is not required to install or run the tool.
120
+
121
+ Read the [changelog](CHANGELOG.md), [security policy](SECURITY.md), and [MIT license](LICENSE).
@@ -12,6 +12,16 @@ Never attach Codex session files, transcripts, or full generated reports to a pu
12
12
 
13
13
  The `--share` command emits a bounded aggregate designed for sharing. Sharing its dates, counts, or durations is still an intentional disclosure. Review the card before publishing it.
14
14
 
15
- ## What to include
15
+ ## Data boundaries
16
+
17
+ The scanner reads local archive bytes and decodes only bounded timing and source metadata. It does not decode conversation, reasoning, or tool payloads. The CLI does not send session data over the network.
18
+
19
+ Private merge exports retain exact start timestamps, durations, source classes, and persistent hashed turn identifiers. Hashes permit correlation and do not anonymize activity. Keep these exports private. Full text and CSV reports also reveal activity patterns.
20
+
21
+ Public share exports use a separate allowlist of aggregate fields. The website validates that schema, rejects private archives, and renders images locally. It has no analytics, cookies, or data-submission endpoint. Downloaded cards still disclose their displayed aggregates and optional human-hours assumptions.
22
+
23
+ All imported data is untrusted. A share card is self-reported and provides no cryptographic proof of runtime, identity, or productivity.
24
+
25
+ ## Reproduction details
16
26
 
17
27
  Describe the affected version, the command or input shape involved, and the observed impact. Provide a minimal reproduction that contains synthetic data. Do not include private session content.
@@ -0,0 +1,36 @@
1
+ # Export contracts
2
+
3
+ Agent Hours has two JSON formats. They serve different purposes and are not interchangeable.
4
+
5
+ ## Public score: `agent-hours-score`, schema version 1
6
+
7
+ Create with `agent-hours --share --format json`. The CLI fixes the window to 30 completed calendar days ending yesterday.
8
+
9
+ | Field | Contents |
10
+ | --- | --- |
11
+ | `schema`, `schema_version` | Format identity and version |
12
+ | `tracker_version`, `methodology_version` | Software and timing-rule versions |
13
+ | `window` | `start`, `end`, `days`, and IANA `timezone` |
14
+ | `scope` | `interactive-only` or `including-exec` |
15
+ | `metrics` | `agent_hours_per_day`, `total_agent_hours`, `peak_day_agent_hours`, `completed_turns`, `active_days` |
16
+ | `leverage` | `null`, or `ratio`, `human_hours`, `basis`, and `human_hours_per_week` |
17
+
18
+ Leverage basis is `reported-period` or `estimated-weekly`. Reported-period leverage has a null weekly-hours field. Numeric values are finite and nonnegative. Supplied human hours are positive.
19
+
20
+ The schema excludes daily rows, machine labels, account details, paths, identifiers, and diagnostics. The browser rejects private exports and unexpected fields. Imported scores are self-reported, not independently verified. A user can edit JSON, so these cards do not establish leaderboard eligibility or attest to an account's activity.
21
+
22
+ Pasting a score does not submit it to a server. PNG/SVG generation uses the same local renderer as the card preview. Exported images disclose the fields shown on the preview.
23
+
24
+ ## Private archive: `agent-hours-archive`, schema version 1
25
+
26
+ Create with `agent-hours --export reports/machine.agent-hours-private.json --label machine`. Export collects available timing observations across the selected directories, including exec/batch observations. It is not a date-bounded public score.
27
+
28
+ The archive contains a methodology version, optional user label, compact observations, and diagnostics. Each observation includes a deterministic hash of the typed turn identifier, start timestamp, duration, timing usability, and source class. It contains no conversation payloads or raw turn identifiers.
29
+
30
+ Retaining the best observation per source class lets a later merge apply source selection before deduplication. It also preserves the independent human-root sample. The merge rejects incompatible versions and malformed data rather than silently reinterpreting them.
31
+
32
+ Precise timestamps and persistent hashes reveal activity patterns and permit correlation between exports. Hashing does not make this public-safe. Transfer archives only between machines or people you intend to grant this access. Store them under ignored `reports/` paths. Never paste a private archive into the public share studio.
33
+
34
+ ## Reproduction
35
+
36
+ Use the same methodology, scope, date bounds, timezone, and input archives to reproduce a report. Individual input subtotals may overlap. Use the globally deduplicated combined total. Session histories that have been removed or rewritten can change later measurements.
@@ -14,21 +14,23 @@ The payload `started_at` value supplies the turn start timestamp. The selected I
14
14
 
15
15
  An explicit `--start` or `--end` date defines an inclusive range. Turns whose local start date falls outside the range do not contribute. The metrics builder creates one row for every date in the range, including zero-use days. Calendar-day means, medians, percentiles, and the daily histogram use those zero-use rows.
16
16
 
17
- ## Archive Score window
17
+ ## Agent-Hour Score window
18
18
 
19
- The canonical Archive Score and an unbounded report use the 30 most recent completed local calendar days ending yesterday. The range is inclusive. If today is March 1, the range is January 30 through February 28. `--share` always uses this window and rejects explicit date bounds and report formats.
19
+ The canonical Agent-Hour Score and an unbounded report use the 30 most recent completed local calendar days ending yesterday. The range is inclusive. If today is March 1 in a non-leap year, the range is January 30 through February 28. `--share` always uses this window and rejects explicit date bounds. It supports text or sanitized JSON output. The old name was Archive Score.
20
20
 
21
21
  Root-turn duration statistics use the same inclusive local-start-date range and selected timezone. A root sample includes valid zero-duration turns. An empty root sample reports count 0 and mean and median 0.00 minutes. The normal text report shows the sample count and its mean and median active durations in minutes. These statistics do not change the all-turn daily rows or agent-hour totals.
22
22
 
23
- ## Session selection and batch exclusion
23
+ ## Session selection and exec inclusion
24
24
 
25
- The scanner includes non-batch turns in the existing all-turn totals. A root session has a source string of `cli`, `vscode`, or `user`. A delegated session has a direct source mapping with a `subagent` key. The scanner classifies a session file as batch when session metadata uses `exec`, `batch`, or `codex_exec`. A direct source mapping with an `exec` or `batch` key also marks the file as batch. Batch wins if present and excludes every completed turn found in that file.
25
+ The default `interactive-only` scope includes non-batch turns. A root session has a source string of `cli`, `vscode`, or `user`. A delegated session has a direct source mapping with a `subagent` key. The scanner classifies a session file as batch when session metadata uses `exec`, `batch`, or `codex_exec`. A direct source mapping with an `exec` or `batch` key also marks the file as batch. Batch wins if present in a file.
26
+
27
+ `--include-exec` selects the `including-exec` scope and includes batch observations in runtime totals. Exec records never enter the human-root sample. The default label describes a source filter, not proven human initiation of every included turn. Some human-directed remote activity uses exec sources. Classification cannot distinguish it from unattended scripts using the same source metadata.
26
28
 
27
29
  Unknown, missing, malformed, and conflicting source evidence remains eligible for non-batch all-turn aggregation, but is excluded from root-only statistics. Mixed non-batch source evidence never enters the root sample. The normal report emits a bounded fingerprint label for an unknown source. Share diagnostics omit that label.
28
30
 
29
31
  ## Global deduplication and ranking
30
32
 
31
- The scanner excludes batch files before deduplicating observations globally by `turn_id` across all session files. One observation remains for each ID in the existing all-turn list. Root observations are deduplicated separately, after batch exclusion, so a delegated duplicate cannot hide a root observation in root-only statistics. The all-turn ranking is unchanged and uses event-timing usability first:
33
+ The tracker applies the selected source filter before deduplicating observations globally by turn identity across all input files, directories, and private exports. Private exports use SHA256 of a type-tagged turn identifier. One observation remains for each identity in the all-turn list. Root observations are deduplicated separately, so a delegated duplicate cannot hide a root observation in root-only statistics. The ranking uses event-timing usability first:
32
34
 
33
35
  1. Prefer an observation with usable event timing.
34
36
  2. Prefer the greater duration.
@@ -42,6 +44,26 @@ Codex can store compacted context in top-level `compacted` records and `event_ms
42
44
 
43
45
  Compaction remains compatible while the archive retains `task_started` and `task_complete` metadata. If a future archive format removes or replaces those records, the scanner will omit affected turns until that format is supported.
44
46
 
47
+ ## Human-hours denominator and Agent Leverage
48
+
49
+ Agent Leverage equals cumulative agent runtime divided by human work hours for the same report period. `--human-hours` supplies the total for that period. `--human-hours-per-week` estimates it as weekly hours multiplied by the number of calendar days and divided by seven. The two flags are mutually exclusive. No human-hours assumption is applied by default.
50
+
51
+ All agent runtime in the period stays in the numerator, including runtime on human days off. The weekly estimate prorates an average schedule; it does not reconstruct actual weekdays or vacations. Prompt activity cannot establish human labor time. Runtime and leverage do not measure productivity, work quality, or time saved.
52
+
53
+ ## Monthly summaries and multiple inputs
54
+
55
+ Monthly summaries group the report's daily rows and include zero-use days. Partial months show the actual covered date range and use its day count, not the full month's length. Input subtotals describe each supplied archive or directory independently. They may overlap and need not sum to the globally deduplicated total.
56
+
57
+ Machine labels are optional user-supplied descriptions. The tool does not read account credentials and cannot separate accounts sharing one session directory. See [export contracts](exports.md) for private transfer and public sharing boundaries.
58
+
59
+ ## Benchmark context
60
+
61
+ The bundled registry records source, publication date, measurement period, population, units, and limitations. The website and package share these values.
62
+
63
+ OpenAI reports an aggregate ratio of 3.1 agent-workdays per human workday for its research organization in mid-August 2026. A personal denominator based on an assumed weekly schedule does not establish equivalent measurement. [September 6 source](https://openai.com/index/research-acceleration-view-inside-openai/)
64
+
65
+ The historical internal P99 reference exceeds 60 agent-hours per active day in June 2026. Its daily-active denominator differs from this tool's 30-calendar-day score. It does not establish a current external-user percentile. [June 25 source](https://openai.com/index/how-agents-are-transforming-work/)
66
+
45
67
  ## Diagnostics
46
68
 
47
69
  The CLI reports malformed candidate lines and affected file counts. It reports incomplete turns, unmatched completions, duration fallbacks, event-timing fallbacks, duplicate observations, and excluded batch turns when those counts are nonzero. A normal report also lists unknown source fingerprints. `--share` keeps diagnostics aggregate-only and omits source labels and file paths.
@@ -56,6 +78,6 @@ The CLI reports malformed candidate lines and affected file counts. It reports i
56
78
 
57
79
  - The 30-minute event-gap cap and fallback durations are estimates when session timestamps are sparse or incomplete.
58
80
 
59
- - Batch detection is file-level. One batch classification excludes all completed turns in that file.
81
+ - Batch detection is file-level. One batch classification excludes all completed turns in that file under the default scope.
60
82
 
61
83
  - Malformed records, incomplete turns, unmatched completions, and invalid metadata do not contribute to totals. Diagnostics expose counts, not the discarded content.
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "codex-agent-hour-tracker"
7
- version = "0.1.2"
7
+ version = "0.2.0"
8
8
  description = "Measure cumulative Codex agent runtime without decoding conversation content."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"
@@ -49,6 +49,11 @@ include = [
49
49
  "/README.md",
50
50
  "/LICENSE",
51
51
  "/SECURITY.md",
52
+ "/CHANGELOG.md",
52
53
  "/docs",
54
+ "/site",
55
+ "/scripts",
56
+ "/skills",
57
+ "/.gitignore",
53
58
  "/pyproject.toml",
54
59
  ]
@@ -0,0 +1,35 @@
1
+ """Generate the website's offline benchmark registry from package data."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import argparse
6
+ import json
7
+ from pathlib import Path
8
+
9
+ ROOT = Path(__file__).resolve().parents[1]
10
+
11
+
12
+ def main() -> int:
13
+ parser = argparse.ArgumentParser(description=__doc__)
14
+ parser.add_argument("--check", action="store_true")
15
+ args = parser.parse_args()
16
+ registry = json.loads(
17
+ (ROOT / "src/agent_hour_tracker/benchmarks.json").read_text(encoding="utf-8")
18
+ )
19
+ content = (
20
+ "// Generated by scripts/sync_benchmarks.py; edit the package registry.\n"
21
+ "globalThis.AGENT_HOURS_BENCHMARKS = "
22
+ + json.dumps(registry, indent=2, ensure_ascii=True)
23
+ + ";\n"
24
+ )
25
+ target = ROOT / "site/benchmarks-data.js"
26
+ if args.check:
27
+ if not target.exists() or target.read_text(encoding="utf-8") != content:
28
+ parser.exit(1, "Website benchmark data is stale. Run scripts/sync_benchmarks.py.\n")
29
+ else:
30
+ target.write_text(content, encoding="utf-8")
31
+ return 0
32
+
33
+
34
+ if __name__ == "__main__":
35
+ raise SystemExit(main())
@@ -0,0 +1,6 @@
1
+ /*
2
+ Content-Security-Policy: default-src 'self'; script-src 'self'; style-src 'self'; img-src 'self' data:; connect-src 'none'; font-src 'self'; object-src 'none'; base-uri 'none'; frame-ancestors 'none'; form-action 'none'
3
+ Referrer-Policy: no-referrer
4
+ X-Content-Type-Options: nosniff
5
+ X-Frame-Options: DENY
6
+ Permissions-Policy: camera=(), microphone=(), geolocation=()