@mauricode/token-derby 3.1.3 → 4.0.0
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 +40 -8
- package/dist/bin.js +1537 -1012
- package/dist/bin.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -74,11 +74,15 @@ Nothing here asks you to hold work back. A flat-out day still beats a lazy one
|
|
|
74
74
|
|
|
75
75
|
Stamina is off by default; org owners turn it on and tune it from the Race Settings tab of `token-derby web`. When it's on, the live view shows your horse's stamina as a percentage and bar, plus a multiplier once you're actually losing score to fatigue.
|
|
76
76
|
|
|
77
|
-
## Other
|
|
77
|
+
## Other coding agents (Codex CLI, Gemini CLI)
|
|
78
78
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
79
|
+
Every token is worth the same wherever it came from, so you can use one tool or
|
|
80
|
+
all three and nothing needs choosing at join.
|
|
81
|
+
|
|
82
|
+
Tokens are counted per **model family** — Anthropic, OpenAI or Google — rather
|
|
83
|
+
than per tool. The two are usually the same thing today, since each tool runs one
|
|
84
|
+
vendor's models, but they are tracked separately so a tool that can run several
|
|
85
|
+
vendors' models counts each one correctly.
|
|
82
86
|
|
|
83
87
|
- **Codex CLI** — counted from `~/.codex/sessions/**/rollout-*.jsonl` (and
|
|
84
88
|
`archived_sessions/`). Fresh input = `input_tokens − cached_input_tokens`;
|
|
@@ -87,8 +91,37 @@ be changed, even by rejoining.
|
|
|
87
91
|
- **Gemini CLI** — counted from `~/.gemini/tmp/<project>/chats/session-*.jsonl`.
|
|
88
92
|
Fresh input = `input − cached`; output = `output` (thoughts included).
|
|
89
93
|
|
|
90
|
-
|
|
91
|
-
|
|
94
|
+
A tool you've never run simply contributes nothing — no configuration needed.
|
|
95
|
+
Overrides: `TOKEN_DERBY_CODEX_DIR`, `TOKEN_DERBY_GEMINI_DIR`.
|
|
96
|
+
|
|
97
|
+
- **Pi** — counted from `~/.pi/agent/sessions/**/*.jsonl`, and **off until you
|
|
98
|
+
turn it on**: `token-derby harness enable pi`.
|
|
99
|
+
|
|
100
|
+
Pi is the one agent that can run models from several vendors, so its tokens
|
|
101
|
+
are attributed to whichever vendor actually produced them — a Pi session that
|
|
102
|
+
starts on Claude and switches to GPT counts as both. Fresh input is uncached
|
|
103
|
+
input plus cache writes; cache reads are excluded, as everywhere else.
|
|
104
|
+
|
|
105
|
+
Usage on a provider outside those three is not counted, and the race view says
|
|
106
|
+
so rather than leaving you to wonder. That includes gateways such as Bedrock,
|
|
107
|
+
OpenRouter and Cloudflare: they can serve models we score, but their model ids
|
|
108
|
+
do not reliably say which vendor is behind them, so we decline to guess.
|
|
109
|
+
|
|
110
|
+
### Choosing what gets counted
|
|
111
|
+
|
|
112
|
+
```
|
|
113
|
+
token-derby harness list # what this machine counts, and what it found
|
|
114
|
+
token-derby harness disable codex-cli # stop counting one
|
|
115
|
+
token-derby harness enable codex-cli # start counting it again
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
A disabled agent is not scanned at all, which is also the way to keep a very
|
|
119
|
+
large history from eating into the per-beat scan budget. Changes take effect on
|
|
120
|
+
your next heartbeat — no need to rejoin — and the race view marks anything
|
|
121
|
+
turned off, so it is never a mystery why work is not counting.
|
|
122
|
+
|
|
123
|
+
Nothing is lost by turning one off mid-race: your totals hold where they are and
|
|
124
|
+
catch up when you turn it back on.
|
|
92
125
|
|
|
93
126
|
All of this counts **real** tokens you actually generated. Please don't point it
|
|
94
127
|
at usage you didn't produce.
|
|
@@ -136,5 +169,4 @@ URLs they travel in.
|
|
|
136
169
|
|
|
137
170
|
Token Derby counts usage from this machine's filesystem only. If Claude Code runs
|
|
138
171
|
in a container, over SSH, or on another machine, join the race from there — `join`
|
|
139
|
-
warns before entering a race
|
|
140
|
-
- **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, for organisation-scheduled races, via the "Primary top-5 cap" option on the schedule tab of `token-derby web`. Off by default (every conversation counts).
|
|
172
|
+
warns before entering a race when none of the three tools has transcripts to read.
|