@mauricode/token-derby 2.9.0 → 2.10.1

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.
package/README.md CHANGED
@@ -43,10 +43,29 @@ token-derby end <admin-code>
43
43
 
44
44
  ## What's tracked
45
45
 
46
- The CLI sums `message.usage.output_tokens` across every `*.jsonl` under `~/.claude/projects/`. Your "race tokens" are everything generated since the moment you joined. Tokens generated while disconnected are skipped — that window is your crash penalty.
46
+ The CLI sums `message.usage.output_tokens` across every `*.jsonl` under `~/.claude/projects/`. This includes **subagents and dynamic workflows** — their transcripts nest under `<project>/<session>/subagents/…` (and `…/subagents/workflows/wf_<id>/…`), and the scanner recurses into all of them, so a Plan/Workflow that fans out across many agents counts all of that real output. Your "race tokens" are everything generated since the moment you joined. Tokens generated while disconnected are skipped — that window is your crash penalty.
47
47
 
48
48
  Races can optionally also count *fresh input tokens* — i.e. `input_tokens + cache_creation_input_tokens` (your new context this turn) in addition to output. `cache_read_input_tokens` is never counted, since those reflect passive context size rather than work. The race creator opts in at `token-derby create` time; thresholds for Stampede!, Pulled Away!, and the heartbeat rate cap scale 10× in these races so the achievement cadence stays comparable.
49
49
 
50
+ ## Other models (Codex, Gemini)
51
+
52
+ At join you pick one **primary** model — Claude, Codex, or Gemini — counted 1:1.
53
+ The other two count at **10%**. The choice is locked for the whole race and can't
54
+ be changed, even by rejoining.
55
+
56
+ - **Codex CLI** — counted from `~/.codex/sessions/**/rollout-*.jsonl` (and
57
+ `archived_sessions/`). Fresh input = `input_tokens − cached_input_tokens`;
58
+ output = `output_tokens` (reasoning included). The last cumulative
59
+ `token_count` per session is used.
60
+ - **Gemini CLI** — counted from `~/.gemini/tmp/<project>/chats/session-*.jsonl`.
61
+ Fresh input = `input − cached`; output = `output` (thoughts included).
62
+
63
+ Pick at join with `token-derby join <code> --primary codex` (or the interactive
64
+ picker). Overrides: `TOKEN_DERBY_CODEX_DIR`, `TOKEN_DERBY_GEMINI_DIR`.
65
+
66
+ All of this counts **real** tokens you actually generated. Please don't point it
67
+ at usage you didn't produce.
68
+
50
69
  ## Files
51
70
 
52
71
  - `~/.token-derby/stable.json` — saved horses
@@ -57,3 +76,4 @@ Races can optionally also count *fresh input tokens* — i.e. `input_tokens + ca
57
76
  - `TOKEN_DERBY_API_BASE` — override the API base URL (default: `https://token-derby.mauricode.co.uk/api`)
58
77
  - `TOKEN_DERBY_HOME` — override the data directory (default: `~/.token-derby`)
59
78
  - `TOKEN_DERBY_CLAUDE_DIR` — override the transcripts directory (default: `~/.claude/projects`)
79
+ - **Top-5 conversations (primary):** a race can be created so that only each racer's **5 most-active conversations per heartbeat** count toward their **primary** model's score (secondaries unaffected). The race creator opts in at `token-derby create` (prompt) or on a schedule with `organisation schedule set … --primary-top5`. Off by default (every conversation counts).