idletime 0.1.3 → 0.2.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 +70 -3
- package/dist/idletime.js +1820 -864
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ Local Bun CLI for Codex activity, token burn, visual 24-hour rhythm charts, and
|
|
|
14
14
|
|
|
15
15
|
## How It Works
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
The dashboard and snapshot commands are read-only. They scan your local Codex session logs under `~/.codex/sessions/YYYY/MM/DD/*.jsonl` and build reports from those raw events. The explicit `refresh-bests` command is the maintenance exception: it updates `~/.idletime/` and can fire best-related notifications.
|
|
18
18
|
|
|
19
19
|
At a high level:
|
|
20
20
|
|
|
@@ -66,6 +66,7 @@ That shows:
|
|
|
66
66
|
|
|
67
67
|
- A gold `BEST` plaque in the header for your top concurrent agents, top 24-hour raw burn, and top agent-sum record
|
|
68
68
|
- A framed trailing-24h dashboard
|
|
69
|
+
- A dedicated `Agents` section that charts concurrent child-task windows over the day
|
|
69
70
|
- A `24h Rhythm` strip for `focus`, `active`, `quiet` or `idle`, and `burn`
|
|
70
71
|
- `Spike Callouts` for the biggest burn hours
|
|
71
72
|
- A lower detail section with activity, tokens, and wake-window stats
|
|
@@ -77,11 +78,14 @@ That shows:
|
|
|
77
78
|
- `idle`: awake idle time, only shown when you pass `--wake`
|
|
78
79
|
- `quiet`: non-active time when no wake window is provided
|
|
79
80
|
- `burn`: practical burn, calculated as `input - cached_input + output`
|
|
81
|
+
- `Agents`: concurrent child-task windows derived from transcript lifecycle records when they exist, with a compatibility fallback for older subagent logs
|
|
80
82
|
|
|
81
83
|
Additional behavior:
|
|
82
84
|
|
|
83
85
|
- `last24h`: the default trailing window, clipped to the actual last 24 hours
|
|
84
86
|
- `today`: local midnight to now
|
|
87
|
+
- `live`: global task scoreboard by default, with `waiting on you`, `running`, recent concurrency, and per-project live state
|
|
88
|
+
- `refresh-bests`: explicit full-history personal-record refresh for the `BEST` plaque and best-related notifications
|
|
85
89
|
- `direct`: user-started work in the main CLI or compatible direct session types
|
|
86
90
|
- `subagent`: spawned agent sessions
|
|
87
91
|
- `idle cutoff`: how long activity stays alive after the last event before it counts as quiet or idle
|
|
@@ -124,12 +128,54 @@ Open the full hourly table:
|
|
|
124
128
|
bun run idletime hourly --window 24h --workspace-only /path/to/demo-workspace
|
|
125
129
|
```
|
|
126
130
|
|
|
131
|
+
Open the live global scoreboard:
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
bun run idletime live
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
`live` defaults to all local sessions. Use `--workspace-only` when you want to pin the board to one repo or project path.
|
|
138
|
+
Use `--global` when you want to clear a previously added workspace scope explicitly.
|
|
139
|
+
When stdout is a TTY it repaints in place like a scoreboard. When stdout is not a TTY, it renders one snapshot and exits, which makes it usable in scripts and validation.
|
|
140
|
+
|
|
141
|
+
Pin the live board to one workspace:
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
bun run idletime live --workspace-only /path/to/demo-workspace
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
Refresh your `BEST` records explicitly:
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
bun run idletime refresh-bests
|
|
151
|
+
```
|
|
152
|
+
|
|
127
153
|
Group the summary by model and effort:
|
|
128
154
|
|
|
129
155
|
```bash
|
|
130
156
|
bun run idletime last24h --group-by model --group-by effort
|
|
131
157
|
```
|
|
132
158
|
|
|
159
|
+
Get machine-readable snapshots:
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
bun run idletime --json
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
bun run idletime today --json
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
```bash
|
|
170
|
+
bun run idletime hourly --json
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
bun run idletime live --json
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
`--json` is read-only. It emits one versioned JSON snapshot and exits. On `last24h` and `today`, it does not refresh best metrics or trigger best-related notifications. `--share` is human-only and cannot be combined with `--json`.
|
|
178
|
+
|
|
133
179
|
## Share Mode
|
|
134
180
|
|
|
135
181
|
`--share` keeps the visual story and trims the secondary detail:
|
|
@@ -145,6 +191,7 @@ That is the best mode for terminal screenshots.
|
|
|
145
191
|
|
|
146
192
|
The top of the dashboard is intentionally visual-first.
|
|
147
193
|
|
|
194
|
+
- `Agents` plots concurrent child-task windows with real clock labels like `8am`, `12pm`, and `4pm`
|
|
148
195
|
- `24h Rhythm` gives one character per hour bucket across the trailing day
|
|
149
196
|
- `focus` makes it obvious where you were actually engaged
|
|
150
197
|
- `active` shows the broader direct-session footprint
|
|
@@ -152,6 +199,17 @@ The top of the dashboard is intentionally visual-first.
|
|
|
152
199
|
- `burn` highlights token spikes without making you read the table first
|
|
153
200
|
- `Spike Callouts` surfaces the top burn hours immediately
|
|
154
201
|
|
|
202
|
+
The live board is intentionally narrower:
|
|
203
|
+
|
|
204
|
+
- `waiting on you`: recent direct sessions whose latest task completed after your last `user_message`, so you likely owe the next reply
|
|
205
|
+
- `running`: active task windows across the selected scope after effort-aware staleness
|
|
206
|
+
- `running at`: per-project counts for currently running work
|
|
207
|
+
- `waiting at`: per-project counts for sessions currently waiting on you
|
|
208
|
+
- `top waiting`: the specific waiting threads, shown as `project • age • thread id`
|
|
209
|
+
- `recent`: short live concurrency strip across the last 15 minutes
|
|
210
|
+
- `this turn`: completed child tasks anchored to the latest still-warm direct `user_message`
|
|
211
|
+
- `today peak`: highest observed concurrent child-task count since local midnight
|
|
212
|
+
|
|
155
213
|
## Help
|
|
156
214
|
|
|
157
215
|
```bash
|
|
@@ -182,10 +240,17 @@ idletime --version
|
|
|
182
240
|
|
|
183
241
|
By default:
|
|
184
242
|
|
|
185
|
-
-
|
|
186
|
-
-
|
|
243
|
+
- dashboards read cached `BEST` values when `bests-v1.json` already exists
|
|
244
|
+
- a cold cache renders without the `BEST` plaque instead of bootstrapping best state implicitly
|
|
245
|
+
- genuine new-best events can trigger a local macOS notification during the explicit refresh path
|
|
187
246
|
- near-best nudges are stored but disabled until you opt in by setting `nearBestEnabled` to `true`
|
|
188
247
|
|
|
248
|
+
When you want to recompute those records, update the ledger, and fire any eligible notifications, run:
|
|
249
|
+
|
|
250
|
+
```bash
|
|
251
|
+
bun run idletime refresh-bests
|
|
252
|
+
```
|
|
253
|
+
|
|
189
254
|
## Validation
|
|
190
255
|
|
|
191
256
|
```bash
|
|
@@ -206,6 +271,8 @@ That QA pass reads:
|
|
|
206
271
|
|
|
207
272
|
It builds the package, packs the current checkout, installs the tarball into an isolated temp `BUN_INSTALL`, seeds synthetic Codex session logs, and runs the shell journeys against the installed `idletime` binary.
|
|
208
273
|
|
|
274
|
+
Operational note: the default `last24h` and `today` commands now stay on the fast read path. They render from the requested report window plus any cached `BEST` ledger state and do not refresh records implicitly. `refresh-bests` is the only CLI command that performs the full-history best-metrics scan.
|
|
275
|
+
|
|
209
276
|
## Release Prep
|
|
210
277
|
|
|
211
278
|
Build the publishable CLI bundle:
|